diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 7b7382d0f75889c788a75ad05fddc34f7a37f914..44a25f3f51d11cf5977c0542c1db71d4b501b75d 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -49,6 +49,7 @@ restrictions referred to are that the relevant option is valid if: MCA MCA bus support is enabled. MDA MDA console support is enabled. MOUSE Appropriate mouse support is enabled. + MSI Message Signaled Interrupts (PCI). MTD MTD support is enabled. NET Appropriate network support is enabled. NUMA NUMA support is enabled. @@ -1152,6 +1153,9 @@ running once the system is up. Mechanism 2. nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI Configuration + nomsi [MSI] If the PCI_MSI kernel config parameter is + enabled, this kernel boot option can be used to + disable the use of MSI interrupts system-wide. nosort [IA-32] Don't sort PCI devices according to order given by the PCI BIOS. This sorting is done to get a device order compatible with diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index d3dcce815d15ff6cf0a89a27610a52caec7c854f..4d762fc4878cc0d328121185cf80c356a7f4f6b6 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -11,6 +11,10 @@ config PCI_MSI generate an interrupt using an inbound Memory Write on its PCI bus instead of asserting a device IRQ pin. + Use of PCI MSI interrupts can be disabled at kernel boot time + by using the 'pci=nomsi' option. This disables MSI for the + entire system. + If you don't know what to do here, say N. config PCI_DEBUG diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index aea8b258b9b83714f5f0cd296afac4adfd12fc15..a77e79c8c82ef74ffe73f6dd606c5b598125ec50 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -765,8 +765,11 @@ void pci_disable_msi(struct pci_dev* dev) u16 control; unsigned long flags; + if (!pci_msi_enable) + return; if (!dev) return; + pos = pci_find_capability(dev, PCI_CAP_ID_MSI); if (!pos) return; @@ -1026,6 +1029,8 @@ void pci_disable_msix(struct pci_dev* dev) int pos, temp; u16 control; + if (!pci_msi_enable) + return; if (!dev) return; @@ -1152,6 +1157,11 @@ void msi_remove_pci_irq_vectors(struct pci_dev* dev) } } +void pci_no_msi(void) +{ + pci_msi_enable = 0; +} + EXPORT_SYMBOL(pci_enable_msi); EXPORT_SYMBOL(pci_disable_msi); EXPORT_SYMBOL(pci_enable_msix); diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 0bf6d254426bf2a4c17611643ce68aa62342f795..03af2323893971ec5b3bcd8ef761781aef014f57 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -900,8 +900,12 @@ static int __devinit pci_setup(char *str) if (k) *k++ = 0; if (*str && (str = pcibios_setup(str)) && *str) { - /* PCI layer options should be handled here */ - printk(KERN_ERR "PCI: Unknown option `%s'\n", str); + if (!strcmp(str, "nomsi")) { + pci_no_msi(); + } else { + printk(KERN_ERR "PCI: Unknown option `%s'\n", + str); + } } str = k; } diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index a6dfee2f6d2bac33dce10a24ef983f2cc680c4d8..8f3fb47ea671997a223189fc1cde878eb2ebff33 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -50,8 +50,10 @@ extern int pci_msi_quirk; #ifdef CONFIG_PCI_MSI void disable_msi_mode(struct pci_dev *dev, int pos, int type); +void pci_no_msi(void); #else static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { } +static inline void pci_no_msi(void) { } #endif extern int pcie_mch_quirk;