mirror of https://gitee.com/openkylin/linux.git
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. Link: https://lore.kernel.org/r/20200526213905.2479381-1-kw@linux.com Signed-off-by: Krzysztof Wilczyński <kw@linux.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
This commit is contained in:
parent
5dda3ba6fc
commit
3910ebaca8
|
@ -938,7 +938,7 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
|
||||||
* assignments made by firmware for this host bridge.
|
* assignments made by firmware for this host bridge.
|
||||||
*/
|
*/
|
||||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1,
|
obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1,
|
||||||
IGNORE_PCI_BOOT_CONFIG_DSM, NULL);
|
DSM_PCI_PRESERVE_BOOT_CONFIG, NULL);
|
||||||
if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0)
|
if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0)
|
||||||
host_bridge->preserve_config = 1;
|
host_bridge->preserve_config = 1;
|
||||||
ACPI_FREE(obj);
|
ACPI_FREE(obj);
|
||||||
|
|
|
@ -1128,7 +1128,7 @@ void acpi_pci_add_bus(struct pci_bus *bus)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
|
obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 3,
|
||||||
RESET_DELAY_DSM, NULL);
|
DSM_PCI_POWER_ON_RESET_DELAY, NULL);
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -1193,7 +1193,7 @@ static void pci_acpi_optimize_delay(struct pci_dev *pdev,
|
||||||
pdev->d3cold_delay = 0;
|
pdev->d3cold_delay = 0;
|
||||||
|
|
||||||
obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,
|
obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 3,
|
||||||
FUNCTION_DELAY_DSM, NULL);
|
DSM_PCI_DEVICE_READINESS_DURATIONS, NULL);
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -178,7 +178,7 @@ static int dsm_get_label(struct device *dev, char *buf,
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
|
obj = acpi_evaluate_dsm(handle, &pci_acpi_dsm_guid, 0x2,
|
||||||
DEVICE_LABEL_DSM, NULL);
|
DSM_PCI_DEVICE_NAME, NULL);
|
||||||
if (!obj)
|
if (!obj)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -218,7 +218,7 @@ static bool device_has_dsm(struct device *dev)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,
|
return !!acpi_check_dsm(handle, &pci_acpi_dsm_guid, 0x2,
|
||||||
1 << DEVICE_LABEL_DSM);
|
1 << DSM_PCI_DEVICE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
static umode_t acpi_index_string_exist(struct kobject *kobj,
|
static umode_t acpi_index_string_exist(struct kobject *kobj,
|
||||||
|
|
|
@ -107,10 +107,12 @@ static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { }
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern const guid_t pci_acpi_dsm_guid;
|
extern const guid_t pci_acpi_dsm_guid;
|
||||||
#define IGNORE_PCI_BOOT_CONFIG_DSM 0x05
|
|
||||||
#define DEVICE_LABEL_DSM 0x07
|
/* _DSM Definitions for PCI */
|
||||||
#define RESET_DELAY_DSM 0x08
|
#define DSM_PCI_PRESERVE_BOOT_CONFIG 0x05
|
||||||
#define FUNCTION_DELAY_DSM 0x09
|
#define DSM_PCI_DEVICE_NAME 0x07
|
||||||
|
#define DSM_PCI_POWER_ON_RESET_DELAY 0x08
|
||||||
|
#define DSM_PCI_DEVICE_READINESS_DURATIONS 0x09
|
||||||
|
|
||||||
#ifdef CONFIG_PCIE_EDR
|
#ifdef CONFIG_PCIE_EDR
|
||||||
void pci_acpi_add_edr_notifier(struct pci_dev *pdev);
|
void pci_acpi_add_edr_notifier(struct pci_dev *pdev);
|
||||||
|
|
Loading…
Reference in New Issue