History

genirq/msi: Make interrupt allocation less convoluted

There is no real reason to do several loops over the MSI descriptors instead of just doing one loop. In case of an error everything is undone anyway so it does not matter whether it's a partial or a full rollback.

Thomas Gleixner committed 4 years ago

Commit ef8dd011 parent a80713f3 files · +69 −67Browse files

Showing the changes to include (1 of 3 files). Show all

Unified · Split

include/linux/msi.h+0−6
@@ -206,12 +206,6 @@ struct msi_desc *msi_next_desc(struct device *dev, enum msi_desc_filter filter); · 205 unmodified lines
206 list_for_each_entry((desc), dev_to_msi_list((dev)), list)206 list_for_each_entry((desc), dev_to_msi_list((dev)), list)
207#define for_each_msi_entry_safe(desc, tmp, dev) \207#define for_each_msi_entry_safe(desc, tmp, dev) \
208 list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list)208 list_for_each_entry_safe((desc), (tmp), dev_to_msi_list((dev)), list)
209#define for_each_msi_vector(desc, __irq, dev) \
210 for_each_msi_entry((desc), (dev)) \
211 if ((desc)->irq) \
212 for (__irq = (desc)->irq; \
213 __irq < ((desc)->irq + (desc)->nvec_used); \
214 __irq++)
215 209
216#ifdef CONFIG_IRQ_MSI_IOMMU210#ifdef CONFIG_IRQ_MSI_IOMMU
217static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc)211static inline const void *msi_desc_get_iommu_cookie(struct msi_desc *desc)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t