aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/msi.c21
-rw-r--r--drivers/pci/pci.c3
-rw-r--r--drivers/pci/pci.h2
3 files changed, 26 insertions, 0 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
index d2812013fd22..74801f7df9c9 100644
--- a/drivers/pci/msi.c
+++ b/drivers/pci/msi.c
@@ -759,3 +759,24 @@ void pci_msi_init_pci_dev(struct pci_dev *dev)
759{ 759{
760 INIT_LIST_HEAD(&dev->msi_list); 760 INIT_LIST_HEAD(&dev->msi_list);
761} 761}
762
763#ifdef CONFIG_ACPI
764#include <linux/acpi.h>
765#include <linux/pci-acpi.h>
766static void __devinit msi_acpi_init(void)
767{
768 if (acpi_pci_disabled)
769 return;
770 pci_osc_support_set(OSC_MSI_SUPPORT);
771 pcie_osc_support_set(OSC_MSI_SUPPORT);
772}
773#else
774static inline void msi_acpi_init(void) { }
775#endif /* CONFIG_ACPI */
776
777void __devinit msi_init(void)
778{
779 if (!pci_msi_enable)
780 return;
781 msi_acpi_init();
782}
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 4db261e13e69..aee73cf251b6 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -1933,6 +1933,9 @@ static int __devinit pci_init(void)
1933 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 1933 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
1934 pci_fixup_device(pci_fixup_final, dev); 1934 pci_fixup_device(pci_fixup_final, dev);
1935 } 1935 }
1936
1937 msi_init();
1938
1936 return 0; 1939 return 0;
1937} 1940}
1938 1941
diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h
index b205ab866a1d..9de87e9f98f5 100644
--- a/drivers/pci/pci.h
+++ b/drivers/pci/pci.h
@@ -98,9 +98,11 @@ extern unsigned int pci_pm_d3_delay;
98#ifdef CONFIG_PCI_MSI 98#ifdef CONFIG_PCI_MSI
99void pci_no_msi(void); 99void pci_no_msi(void);
100extern void pci_msi_init_pci_dev(struct pci_dev *dev); 100extern void pci_msi_init_pci_dev(struct pci_dev *dev);
101extern void __devinit msi_init(void);
101#else 102#else
102static inline void pci_no_msi(void) { } 103static inline void pci_no_msi(void) { }
103static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { } 104static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { }
105static inline void msi_init(void) { }
104#endif 106#endif
105 107
106#ifdef CONFIG_PCIEAER 108#ifdef CONFIG_PCIEAER