Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ACPI/PCI: Set support bit for MSI in support field of _OSC

Currently linux doesn't have any code to set the "MSI supported" bit in
Support Fireld of _OSC. This patch adds the code for that.

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>

authored by

Taku Izumi and committed by
Jesse Barnes
d389fec6 ab20440c

+26
+21
drivers/pci/msi.c
··· 759 759 { 760 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> 766 + static 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 774 + static inline void msi_acpi_init(void) { } 775 + #endif /* CONFIG_ACPI */ 776 + 777 + void __devinit msi_init(void) 778 + { 779 + if (!pci_msi_enable) 780 + return; 781 + msi_acpi_init(); 782 + }
+3
drivers/pci/pci.c
··· 1933 1933 while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) { 1934 1934 pci_fixup_device(pci_fixup_final, dev); 1935 1935 } 1936 + 1937 + msi_init(); 1938 + 1936 1939 return 0; 1937 1940 } 1938 1941
+2
drivers/pci/pci.h
··· 98 98 #ifdef CONFIG_PCI_MSI 99 99 void pci_no_msi(void); 100 100 extern void pci_msi_init_pci_dev(struct pci_dev *dev); 101 + extern void __devinit msi_init(void); 101 102 #else 102 103 static inline void pci_no_msi(void) { } 103 104 static inline void pci_msi_init_pci_dev(struct pci_dev *dev) { } 105 + static inline void msi_init(void) { } 104 106 #endif 105 107 106 108 #ifdef CONFIG_PCIEAER