diff options
| -rw-r--r-- | Documentation/kernel-parameters.txt | 4 | ||||
| -rw-r--r-- | drivers/pci/Kconfig | 4 | ||||
| -rw-r--r-- | drivers/pci/msi.c | 10 | ||||
| -rw-r--r-- | drivers/pci/pci.c | 8 | ||||
| -rw-r--r-- | drivers/pci/pci.h | 2 |
5 files changed, 26 insertions, 2 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 7b7382d0f758..44a25f3f51d1 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: | |||
| 49 | MCA MCA bus support is enabled. | 49 | MCA MCA bus support is enabled. |
| 50 | MDA MDA console support is enabled. | 50 | MDA MDA console support is enabled. |
| 51 | MOUSE Appropriate mouse support is enabled. | 51 | MOUSE Appropriate mouse support is enabled. |
| 52 | MSI Message Signaled Interrupts (PCI). | ||
| 52 | MTD MTD support is enabled. | 53 | MTD MTD support is enabled. |
| 53 | NET Appropriate network support is enabled. | 54 | NET Appropriate network support is enabled. |
| 54 | NUMA NUMA support is enabled. | 55 | NUMA NUMA support is enabled. |
| @@ -1152,6 +1153,9 @@ running once the system is up. | |||
| 1152 | Mechanism 2. | 1153 | Mechanism 2. |
| 1153 | nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI | 1154 | nommconf [IA-32,X86_64] Disable use of MMCONFIG for PCI |
| 1154 | Configuration | 1155 | Configuration |
| 1156 | nomsi [MSI] If the PCI_MSI kernel config parameter is | ||
| 1157 | enabled, this kernel boot option can be used to | ||
| 1158 | disable the use of MSI interrupts system-wide. | ||
| 1155 | nosort [IA-32] Don't sort PCI devices according to | 1159 | nosort [IA-32] Don't sort PCI devices according to |
| 1156 | order given by the PCI BIOS. This sorting is | 1160 | order given by the PCI BIOS. This sorting is |
| 1157 | done to get a device order compatible with | 1161 | done to get a device order compatible with |
diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index d3dcce815d15..4d762fc4878c 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig | |||
| @@ -11,6 +11,10 @@ config PCI_MSI | |||
| 11 | generate an interrupt using an inbound Memory Write on its | 11 | generate an interrupt using an inbound Memory Write on its |
| 12 | PCI bus instead of asserting a device IRQ pin. | 12 | PCI bus instead of asserting a device IRQ pin. |
| 13 | 13 | ||
| 14 | Use of PCI MSI interrupts can be disabled at kernel boot time | ||
| 15 | by using the 'pci=nomsi' option. This disables MSI for the | ||
| 16 | entire system. | ||
| 17 | |||
| 14 | If you don't know what to do here, say N. | 18 | If you don't know what to do here, say N. |
| 15 | 19 | ||
| 16 | config PCI_DEBUG | 20 | config PCI_DEBUG |
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index aea8b258b9b8..a77e79c8c82e 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
| @@ -765,8 +765,11 @@ void pci_disable_msi(struct pci_dev* dev) | |||
| 765 | u16 control; | 765 | u16 control; |
| 766 | unsigned long flags; | 766 | unsigned long flags; |
| 767 | 767 | ||
| 768 | if (!pci_msi_enable) | ||
| 769 | return; | ||
| 768 | if (!dev) | 770 | if (!dev) |
| 769 | return; | 771 | return; |
| 772 | |||
| 770 | pos = pci_find_capability(dev, PCI_CAP_ID_MSI); | 773 | pos = pci_find_capability(dev, PCI_CAP_ID_MSI); |
| 771 | if (!pos) | 774 | if (!pos) |
| 772 | return; | 775 | return; |
| @@ -1026,6 +1029,8 @@ void pci_disable_msix(struct pci_dev* dev) | |||
| 1026 | int pos, temp; | 1029 | int pos, temp; |
| 1027 | u16 control; | 1030 | u16 control; |
| 1028 | 1031 | ||
| 1032 | if (!pci_msi_enable) | ||
| 1033 | return; | ||
| 1029 | if (!dev) | 1034 | if (!dev) |
| 1030 | return; | 1035 | return; |
| 1031 | 1036 | ||
| @@ -1152,6 +1157,11 @@ void msi_remove_pci_irq_vectors(struct pci_dev* dev) | |||
| 1152 | } | 1157 | } |
| 1153 | } | 1158 | } |
| 1154 | 1159 | ||
| 1160 | void pci_no_msi(void) | ||
| 1161 | { | ||
| 1162 | pci_msi_enable = 0; | ||
| 1163 | } | ||
| 1164 | |||
| 1155 | EXPORT_SYMBOL(pci_enable_msi); | 1165 | EXPORT_SYMBOL(pci_enable_msi); |
| 1156 | EXPORT_SYMBOL(pci_disable_msi); | 1166 | EXPORT_SYMBOL(pci_disable_msi); |
| 1157 | EXPORT_SYMBOL(pci_enable_msix); | 1167 | EXPORT_SYMBOL(pci_enable_msix); |
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 0bf6d254426b..03af23238939 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c | |||
| @@ -900,8 +900,12 @@ static int __devinit pci_setup(char *str) | |||
| 900 | if (k) | 900 | if (k) |
| 901 | *k++ = 0; | 901 | *k++ = 0; |
| 902 | if (*str && (str = pcibios_setup(str)) && *str) { | 902 | if (*str && (str = pcibios_setup(str)) && *str) { |
| 903 | /* PCI layer options should be handled here */ | 903 | if (!strcmp(str, "nomsi")) { |
| 904 | printk(KERN_ERR "PCI: Unknown option `%s'\n", str); | 904 | pci_no_msi(); |
| 905 | } else { | ||
| 906 | printk(KERN_ERR "PCI: Unknown option `%s'\n", | ||
| 907 | str); | ||
| 908 | } | ||
| 905 | } | 909 | } |
| 906 | str = k; | 910 | str = k; |
| 907 | } | 911 | } |
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index a6dfee2f6d2b..8f3fb47ea671 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h | |||
| @@ -50,8 +50,10 @@ extern int pci_msi_quirk; | |||
| 50 | 50 | ||
| 51 | #ifdef CONFIG_PCI_MSI | 51 | #ifdef CONFIG_PCI_MSI |
| 52 | void disable_msi_mode(struct pci_dev *dev, int pos, int type); | 52 | void disable_msi_mode(struct pci_dev *dev, int pos, int type); |
| 53 | void pci_no_msi(void); | ||
| 53 | #else | 54 | #else |
| 54 | static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { } | 55 | static inline void disable_msi_mode(struct pci_dev *dev, int pos, int type) { } |
| 56 | static inline void pci_no_msi(void) { } | ||
| 55 | #endif | 57 | #endif |
| 56 | 58 | ||
| 57 | extern int pcie_mch_quirk; | 59 | extern int pcie_mch_quirk; |
