aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
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
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')
-rw-r--r--drivers/pci/msi.c31
-rw-r--r--drivers/pci/pci.c2
-rw-r--r--drivers/pci/pci.h2
3 files changed, 11 insertions, 24 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}
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 48fa860276d4..2cfa41e367a7 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2105,8 +2105,6 @@ static int __devinit pci_init(void)
2105 pci_fixup_device(pci_fixup_final, dev); 2105 pci_fixup_device(pci_fixup_final, dev);
2106 } 2106 }
2107 2107
2108 msi_init();
2109
2110 return 0; 2108 return 0;
2111} 2109}
2112 2110
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index d3e65e29df51..9162e242b99e 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -102,11 +102,9 @@ extern unsigned int pci_pm_d3_delay;
102#ifdef CONFIG_PCI_MSI 102#ifdef CONFIG_PCI_MSI
103void pci_no_msi(void); 103void pci_no_msi(void);
104extern void pci_msi_init_pci_dev(struct pci_dev *dev); 104extern void pci_msi_init_pci_dev(struct pci_dev *dev);
105extern void __devinit msi_init(void);
106#else 105#else
107static inline void pci_no_msi(void) { } 106static inline void pci_no_msi(void) { }
108static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { } 107static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
109static inline void msi_init(void) { }
110#endif 108#endif
111 109
112#ifdef CONFIG_PCIEAER 110#ifdef CONFIG_PCIEAER