--- linux-2.6.30.noarch/Documentation/kernel-parameters.txt~ 2009-06-24 14:25:04.000000000 -0400 +++ linux-2.6.30.noarch/Documentation/kernel-parameters.txt 2009-06-24 14:25:32.000000000 -0400 @@ -1811,6 +1811,9 @@ and is between 256 and 4096 characters. check_enable_amd_mmconf [X86] check for and enable properly configured MMIO access to PCI config space on AMD family 10h CPU + msi [MSI] If the PCI_MSI kernel config parameter is + enabled, this kernel boot option can be used to + enable the use of MSI interrupts system-wide. 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. diff --git a/drivers/pci/Kconfig b/drivers/pci/Kconfig index 2a4501d..209758c 100644 --- a/drivers/pci/Kconfig +++ b/drivers/pci/Kconfig @@ -21,6 +21,18 @@ config PCI_MSI If you don't know what to do here, say N. +config PCI_MSI_DEFAULT_ON + def_bool y + prompt "Use Message Signaled Interrupts by default" + depends on PCI_MSI + help + Selecting this option will enable use of PCI MSI where applicable + by default. Support for MSI can be disabled through the use of the + pci=nomsi boot flag. Conversely, if this option is not selected, + support for PCI MSI can be enabled by passing the pci=msi flag. + + If you don't know what to do here, say N. + config PCI_LEGACY bool "Enable deprecated pci_find_* API" depends on PCI diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 896a15d..53df583 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c @@ -23,7 +23,11 @@ #include "pci.h" #include "msi.h" +#ifdef CONFIG_PCI_MSI_DEFAULT_ON static int pci_msi_enable = 1; +#else +static int pci_msi_enable = 0; +#endif /*CONFIG_PCI_MSI_DEFAULT_ON*/ /* Arch hooks */ @@ -786,6 +790,11 @@ int pci_msi_enabled(void) } EXPORT_SYMBOL(pci_msi_enabled); +void pci_yes_msi(void) +{ + pci_msi_enable = 1; +} + void pci_msi_init_pci_dev(struct pci_dev *dev) { INIT_LIST_HEAD(&dev->msi_list); diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 17bd932..e9bc9fe 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2393,6 +2393,8 @@ static int __init pci_setup(char *str) if (*str && (str = pcibios_setup(str)) && *str) { if (!strcmp(str, "nomsi")) { pci_no_msi(); + } else if (!strcmp(str, "msi")) { + pci_yes_msi(); } else if (!strcmp(str, "noaer")) { pci_no_aer(); } else if (!strcmp(str, "nodomains")) { diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 26ddf78..85efe81 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -111,9 +111,11 @@ extern unsigned int pci_pm_d3_delay; #ifdef CONFIG_PCI_MSI void pci_no_msi(void); +void pci_yes_msi(void); extern void pci_msi_init_pci_dev(struct pci_dev *dev); #else static inline void pci_no_msi(void) { } +static inline void pci_yes_msi(void) { } static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { } #endif