diff options
-rw-r--r-- | drivers/pci/pci-acpi.c | 9 | ||||
-rw-r--r-- | drivers/pci/pci-label.c | 11 | ||||
-rw-r--r-- | include/linux/pci-acpi.h | 3 |
3 files changed, 14 insertions, 9 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 489063987325..bea6be4992c3 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c | |||
@@ -18,6 +18,15 @@ | |||
18 | #include <linux/pm_qos.h> | 18 | #include <linux/pm_qos.h> |
19 | #include "pci.h" | 19 | #include "pci.h" |
20 | 20 | ||
21 | /* | ||
22 | * The UUID is defined in the PCI Firmware Specification available here: | ||
23 | * https://www.pcisig.com/members/downloads/pcifw_r3_1_13Dec10.pdf | ||
24 | */ | ||
25 | const u8 pci_acpi_dsm_uuid[] = { | ||
26 | 0xd0, 0x37, 0xc9, 0xe5, 0x53, 0x35, 0x7a, 0x4d, | ||
27 | 0x91, 0x17, 0xea, 0x4d, 0x19, 0xc3, 0x43, 0x4d | ||
28 | }; | ||
29 | |||
21 | phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle) | 30 | phys_addr_t acpi_pci_root_get_mcfg_addr(acpi_handle handle) |
22 | { | 31 | { |
23 | acpi_status status = AE_NOT_EXIST; | 32 | acpi_status status = AE_NOT_EXIST; |
diff --git a/drivers/pci/pci-label.c b/drivers/pci/pci-label.c index 2ab1b47c7651..024b5c179348 100644 --- a/drivers/pci/pci-label.c +++ b/drivers/pci/pci-label.c | |||
@@ -31,8 +31,6 @@ | |||
31 | #include <linux/pci-acpi.h> | 31 | #include <linux/pci-acpi.h> |
32 | #include "pci.h" | 32 | #include "pci.h" |
33 | 33 | ||
34 | #define DEVICE_LABEL_DSM 0x07 | ||
35 | |||
36 | #ifdef CONFIG_DMI | 34 | #ifdef CONFIG_DMI |
37 | enum smbios_attr_enum { | 35 | enum smbios_attr_enum { |
38 | SMBIOS_ATTR_NONE = 0, | 36 | SMBIOS_ATTR_NONE = 0, |
@@ -148,11 +146,6 @@ static inline void pci_remove_smbiosname_file(struct pci_dev *pdev) | |||
148 | #endif | 146 | #endif |
149 | 147 | ||
150 | #ifdef CONFIG_ACPI | 148 | #ifdef CONFIG_ACPI |
151 | static const char device_label_dsm_uuid[] = { | ||
152 | 0xD0, 0x37, 0xC9, 0xE5, 0x53, 0x35, 0x7A, 0x4D, | ||
153 | 0x91, 0x17, 0xEA, 0x4D, 0x19, 0xC3, 0x43, 0x4D | ||
154 | }; | ||
155 | |||
156 | enum acpi_attr_enum { | 149 | enum acpi_attr_enum { |
157 | ACPI_ATTR_LABEL_SHOW, | 150 | ACPI_ATTR_LABEL_SHOW, |
158 | ACPI_ATTR_INDEX_SHOW, | 151 | ACPI_ATTR_INDEX_SHOW, |
@@ -179,7 +172,7 @@ static int dsm_get_label(struct device *dev, char *buf, | |||
179 | if (!handle) | 172 | if (!handle) |
180 | return -1; | 173 | return -1; |
181 | 174 | ||
182 | obj = acpi_evaluate_dsm(handle, device_label_dsm_uuid, 0x2, | 175 | obj = acpi_evaluate_dsm(handle, pci_acpi_dsm_uuid, 0x2, |
183 | DEVICE_LABEL_DSM, NULL); | 176 | DEVICE_LABEL_DSM, NULL); |
184 | if (!obj) | 177 | if (!obj) |
185 | return -1; | 178 | return -1; |
@@ -219,7 +212,7 @@ static bool device_has_dsm(struct device *dev) | |||
219 | if (!handle) | 212 | if (!handle) |
220 | return false; | 213 | return false; |
221 | 214 | ||
222 | return !!acpi_check_dsm(handle, device_label_dsm_uuid, 0x2, | 215 | return !!acpi_check_dsm(handle, pci_acpi_dsm_uuid, 0x2, |
223 | 1 << DEVICE_LABEL_DSM); | 216 | 1 << DEVICE_LABEL_DSM); |
224 | } | 217 | } |
225 | 218 | ||
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 24c7728ca681..3801c704a945 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -77,6 +77,9 @@ static inline void acpiphp_remove_slots(struct pci_bus *bus) { } | |||
77 | static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { } | 77 | static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { } |
78 | #endif | 78 | #endif |
79 | 79 | ||
80 | extern const u8 pci_acpi_dsm_uuid[]; | ||
81 | #define DEVICE_LABEL_DSM 0x07 | ||
82 | |||
80 | #else /* CONFIG_ACPI */ | 83 | #else /* CONFIG_ACPI */ |
81 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } | 84 | static inline void acpi_pci_add_bus(struct pci_bus *bus) { } |
82 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } | 85 | static inline void acpi_pci_remove_bus(struct pci_bus *bus) { } |