diff options
author | Michael Ellerman <michael@ellerman.id.au> | 2007-04-05 03:19:10 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-05-02 22:02:37 -0400 |
commit | 4aa9bc955d61fdf03b5f9cee67db188fe1ffa8b7 (patch) | |
tree | bd0604f5d7308d63cafbb1e3134580e284d86a50 /include | |
parent | bab41e9be75121c473b00df2ffa33af3c44066a7 (diff) |
MSI: Use a list instead of the custom link structure
The msi descriptors are linked together with what looks a lot like
a linked list, but isn't a struct list_head list. Make it one.
The only complication is that previously we walked a list of irqs, and
got the descriptor for each with get_irq_msi(). Now we have a list of
descriptors and need to get the irq out of it, so it needs to be in the
actual struct msi_desc. We use 0 to indicate no irq is setup.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/msi.h | 8 | ||||
-rw-r--r-- | include/linux/pci.h | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/include/linux/msi.h b/include/linux/msi.h index d2a200048b22..931e013f1db5 100644 --- a/include/linux/msi.h +++ b/include/linux/msi.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef LINUX_MSI_H | 1 | #ifndef LINUX_MSI_H |
2 | #define LINUX_MSI_H | 2 | #define LINUX_MSI_H |
3 | 3 | ||
4 | #include <linux/list.h> | ||
5 | |||
4 | struct msi_msg { | 6 | struct msi_msg { |
5 | u32 address_lo; /* low 32 bits of msi message address */ | 7 | u32 address_lo; /* low 32 bits of msi message address */ |
6 | u32 address_hi; /* high 32 bits of msi message address */ | 8 | u32 address_hi; /* high 32 bits of msi message address */ |
@@ -24,10 +26,8 @@ struct msi_desc { | |||
24 | unsigned default_irq; /* default pre-assigned irq */ | 26 | unsigned default_irq; /* default pre-assigned irq */ |
25 | }msi_attrib; | 27 | }msi_attrib; |
26 | 28 | ||
27 | struct { | 29 | unsigned int irq; |
28 | __u16 head; | 30 | struct list_head list; |
29 | __u16 tail; | ||
30 | }link; | ||
31 | 31 | ||
32 | void __iomem *mask_base; | 32 | void __iomem *mask_base; |
33 | struct pci_dev *dev; | 33 | struct pci_dev *dev; |
diff --git a/include/linux/pci.h b/include/linux/pci.h index c02074785d40..d43097dc8672 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -190,6 +190,7 @@ struct pci_dev { | |||
190 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ | 190 | struct bin_attribute *res_attr[DEVICE_COUNT_RESOURCE]; /* sysfs file for resources */ |
191 | #ifdef CONFIG_PCI_MSI | 191 | #ifdef CONFIG_PCI_MSI |
192 | unsigned int first_msi_irq; | 192 | unsigned int first_msi_irq; |
193 | struct list_head msi_list; | ||
193 | #endif | 194 | #endif |
194 | }; | 195 | }; |
195 | 196 | ||