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
938938 * assignments made by firmware for this host bridge.
939939 */
940940 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);
942942 if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0)
943943 host_bridge->preserve_config = 1;
944944 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
11281128 return;
11291129
11301130 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);
11321132 if (!obj)
11331133 return;
11341134
@@ -1193,7 +1193,7 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev, · 58 unmodified lines
11931193 pdev->d3cold_delay = 0;
11941194
11951195 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,
1196− FUNCTION_DELAY_DSM, NULL);
1196+ DSM_PCI_DEVICE_READINESS_DURATIONS, NULL);
11971197 if (!obj)
11981198 return;
11991199
drivers/pci/pci-label.c+2−2
@@ -178,7 +178,7 @@ static int dsm_get_label(struct device *dev, char *buf, · 177 unmodified lines
178178 return -1;
179179
180180 obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
181− DEVICE_LABEL_DSM, NULL);
181+ DSM_PCI_DEVICE_NAME, NULL);
182182 if (!obj)
183183 return -1;
184184
@@ -218,7 +218,7 @@ static bool device_has_dsm(struct device *dev) · 33 unmodified lines
218218 return false;
219219
220220 return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,
221− 1 << DEVICE_LABEL_DSM);
221+ 1 << DSM_PCI_DEVICE_NAME);
222222 }
223223
224224 static 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
107107 #endif
108108
109109 extern const guid_t pci_acpi_dsm_guid;
110−#define IGNORE_PCI_BOOT_CONFIG_DSM 0x05
111−#define DEVICE_LABEL_DSM 0x07
112−#define RESET_DELAY_DSM 0x08
113−#define FUNCTION_DELAY_DSM 0x09
110+
111+/* _DSM Definitions for PCI */
112+#define DSM_PCI_PRESERVE_BOOT_CONFIG 0x05
113+#define DSM_PCI_DEVICE_NAME 0x07
114+#define DSM_PCI_POWER_ON_RESET_DELAY 0x08
115+#define DSM_PCI_DEVICE_READINESS_DURATIONS 0x09
114116
115117 #ifdef CONFIG_PCIE_EDR
116118 void pci_acpi_add_edr_notifier(struct pci_dev *pdev);