aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2009-03-17 08:54:10 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-03-20 13:48:14 -0400
commit1c8d7b0a562da06d3ebe83f01b1ed553205d1ae4 (patch)
tree79c84432f5aed5a08b3bef262a10d933daae6a9b /arch
parentf2440d9acbe866b917b16cc0f927366341ce9215 (diff)
PCI MSI: Add support for multiple MSI
Add the new API pci_enable_msi_block() to allow drivers to request multiple MSI and reimplement pci_enable_msi in terms of pci_enable_msi_block. Ensure that the architecture back ends don't have to know about multiple MSI. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/kernel/msi.c4
-rw-r--r--arch/x86/kernel/io_apic.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/msi.c b/arch/powerpc/kernel/msi.c
index 3bb7d3dd28be..0c16e2a854e5 100644
--- a/arch/powerpc/kernel/msi.c
+++ b/arch/powerpc/kernel/msi.c
@@ -19,6 +19,10 @@ int arch_msi_check_device(struct pci_dev* dev, int nvec, int type)
19 return -ENOSYS; 19 return -ENOSYS;
20 } 20 }
21 21
22 /* PowerPC doesn't support multiple MSI yet */
23 if (type == PCI_CAP_ID_MSI && nvec > 1)
24 return 1;
25
22 if (ppc_md.msi_check_device) { 26 if (ppc_md.msi_check_device) {
23 pr_debug("msi: Using platform check routine.\n"); 27 pr_debug("msi: Using platform check routine.\n");
24 return ppc_md.msi_check_device(dev, nvec, type); 28 return ppc_md.msi_check_device(dev, nvec, type);
diff --git a/arch/x86/kernel/io_apic.c b/arch/x86/kernel/io_apic.c
index bc7ac4da90d7..a09549a6321b 100644
--- a/arch/x86/kernel/io_apic.c
+++ b/arch/x86/kernel/io_apic.c
@@ -3510,6 +3510,10 @@ int arch_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)
3510 int index = 0; 3510 int index = 0;
3511#endif 3511#endif
3512 3512
3513 /* x86 doesn't support multiple MSI yet */
3514 if (type == PCI_CAP_ID_MSI && nvec > 1)
3515 return 1;
3516
3513 irq_want = nr_irqs_gsi; 3517 irq_want = nr_irqs_gsi;
3514 sub_handle = 0; 3518 sub_handle = 0;
3515 list_for_each_entry(msidesc, &dev->msi_list, list) { 3519 list_for_each_entry(msidesc, &dev->msi_list, list) {