History

PCI: Rename _DSM constants to align with spec

Rename PCI-related _DSM constants to align them with the PCI Firmware Spec, r3.2, sec 4.6. No functional change intended.

Krzysztof Wilczyński committed 6 years ago

Commit 3910eba1 parent 5dda3ba4 files · +11 −9Browse files

Unified · Split

4 files
  1. drivers/acpi/pci_root.c +1 −1
  2. drivers/pci/pci-acpi.c +2 −2
  3. drivers/pci/pci-label.c +2 −2
  4. include/linux/pci-acpi.h +6 −4
drivers/acpi/pci_root.c+1−1
@@ -938,7 +938,7 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, · 937 unmodified lines
938 * assignments made by firmware for this host bridge.938 * assignments made by firmware for this host bridge.
939 */939 */
940 obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1,940 obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1,
941 IGNORE_PCI_BOOT_CONFIG_DSM, NULL);941 DSM_PCI_PRESERVE_BOOT_CONFIG, NULL);
942 if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0)942 if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0)
943 host_bridge->preserve_config = 1;943 host_bridge->preserve_config = 1;
944 ACPI_FREE(obj);944 ACPI_FREE(obj);
drivers/pci/pci-acpi.c+2−2
@@ -1128,7 +1128,7 @@ void acpi_pci_add_bus(struct pci_bus *bus) · 1127 unmodified lines
1128 return;1128 return;
1129 1129
1130 obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,1130 obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
1131 RESET_DELAY_DSM, NULL);1131 DSM_PCI_POWER_ON_RESET_DELAY, NULL);
1132 if (!obj)1132 if (!obj)
1133 return;1133 return;
1134 1134
@@ -1193,7 +1193,7 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev, · 58 unmodified lines
1193 pdev->d3cold_delay = 0;1193 pdev->d3cold_delay = 0;
1194 1194
1195 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,1195 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,
1196 FUNCTION_DELAY_DSM, NULL);1196 DSM_PCI_DEVICE_READINESS_DURATIONS, NULL);
1197 if (!obj)1197 if (!obj)
1198 return;1198 return;
1199 1199
drivers/pci/pci-label.c+2−2
@@ -178,7 +178,7 @@ static int dsm_get_label(struct device *dev, char *buf, · 177 unmodified lines
178 return -1;178 return -1;
179 179
180 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,180 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
181 DEVICE_LABEL_DSM, NULL);181 DSM_PCI_DEVICE_NAME, NULL);
182 if (!obj)182 if (!obj)
183 return -1;183 return -1;
184 184
@@ -218,7 +218,7 @@ static bool device_has_dsm(struct device *dev) · 33 unmodified lines
218 return false;218 return false;
219 219
220 return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,220 return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,
221 1 << DEVICE_LABEL_DSM);221 1 << DSM_PCI_DEVICE_NAME);
222}222}
223 223
224static umode_t acpi_index_string_exist(struct kobject *kobj,224static umode_t acpi_index_string_exist(struct kobject *kobj,
include/linux/pci-acpi.h+6−4
@@ -107,10 +107,12 @@ static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { } · 106 unmodified lines
107#endif107#endif
108 108
109extern const guid_t pci_acpi_dsm_guid;109extern const guid_t pci_acpi_dsm_guid;
110#define IGNORE_PCI_BOOT_CONFIG_DSM 0x05110
111#define DEVICE_LABEL_DSM 0x07111/* _DSM Definitions for PCI */
112#define RESET_DELAY_DSM 0x08112#define DSM_PCI_PRESERVE_BOOT_CONFIG 0x05
113#define FUNCTION_DELAY_DSM 0x09113#define DSM_PCI_DEVICE_NAME 0x07
114#define DSM_PCI_POWER_ON_RESET_DELAY 0x08
115#define DSM_PCI_DEVICE_READINESS_DURATIONS 0x09
114 116
115#ifdef CONFIG_PCIE_EDR117#ifdef CONFIG_PCIE_EDR
116void pci_acpi_add_edr_notifier(struct pci_dev *pdev);118void pci_acpi_add_edr_notifier(struct pci_dev *pdev);