aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/msi.c
diff options
context:
space:
mode:
authorAndrew Patterson <andrew.patterson@hp.com>2008-11-10 17:31:05 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 14:12:31 -0500
commit07ae95f988a34465bdcb384bfa73c03424fe2312 (patch)
tree4e1901b7fd2ccfdb85a92953c0010a4d3900a3f8 /drivers/pci/msi.c
parenteb9188bdb9d65aeead2382ec3dd656a17ec8936d (diff)
ACPI/PCI: PCI MSI _OSC support capabilities called when root bridge added
The _OSC capability OSC_MSI_SUPPORT is set when the root bridge is added with pci_acpi_osc_support(), so we no longer need to do it in the PCI MSI driver. Also adds the function pci_msi_enabled, which returns true if pci=nomsi is not on the kernel command-line. Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'drivers/pci/msi.c')
-rw-r--r--drivers/pci/msi.c31
1 files changed, 11 insertions, 20 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index 11a51f8ed3b3..b4a90badd0a6 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -776,28 +776,19 @@ void pci_no_msi(void)
776 pci_msi_enable = 0; 776 pci_msi_enable = 0;
777} 777}
778 778
779void pci_msi_init_pci_dev(struct pci_dev *dev) 779/**
780{ 780 * pci_msi_enabled - is MSI enabled?
781 INIT_LIST_HEAD(&dev->msi_list); 781 *
782} 782 * Returns true if MSI has not been disabled by the command-line option
783 783 * pci=nomsi.
784#ifdef CONFIG_ACPI 784 **/
785#include <linux/acpi.h> 785int pci_msi_enabled(void)
786#include <linux/pci-acpi.h>
787static void __devinit msi_acpi_init(void)
788{ 786{
789 if (acpi_pci_disabled) 787 return pci_msi_enable;
790 return;
791 pci_osc_support_set(OSC_MSI_SUPPORT);
792 pcie_osc_support_set(OSC_MSI_SUPPORT);
793} 788}
794#else 789EXPORT_SYMBOL(pci_msi_enabled);
795static inline void msi_acpi_init(void) { }
796#endif /* CONFIG_ACPI */
797 790
798void __devinit msi_init(void) 791void pci_msi_init_pci_dev(struct pci_dev *dev)
799{ 792{
800 if (!pci_msi_enable) 793 INIT_LIST_HEAD(&dev->msi_list);
801 return;
802 msi_acpi_init();
803} 794}