From 1fb992c00197809077fe9fd7c8b075e5d9f417c7 Mon Sep 17 00:00:00 2001 From: Xiongfeng Wang Date: Sun, 6 Oct 2019 17:51:32 +0800 Subject: [PATCH] Revert "arm64: acpi/pci: invoke _DSM whether to preserve firmware PCI setup" hulk inclusion category: feature bugzilla: 23453 CVE: NA ------------------------------------------- The following mainline patch has added support for '_DSM' method. So let's revert the 'hulk inclusion' patch and apply the mainline patch. a78cf96 PCI/ACPI: Evaluate PCI Boot Configuration _DSM This reverts commit 7155715e63b7854413b8ac37101b5fc11ae2894c. Signed-off-by: Xiongfeng Wang Reviewed-by: Hanjun Guo Signed-off-by: Yang Yingliang --- arch/arm64/kernel/pci.c | 20 ++------------------ include/linux/pci-acpi.h | 1 - 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c index 2724c68c48d3..0e2ea1c78542 100644 --- a/arch/arm64/kernel/pci.c +++ b/arch/arm64/kernel/pci.c @@ -169,7 +169,6 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) struct acpi_pci_generic_root_info *ri; struct pci_bus *bus, *child; struct acpi_pci_root_ops *root_ops; - union acpi_object *obj; ri = kzalloc_node(sizeof(*ri), GFP_KERNEL, node); if (!ri) @@ -195,23 +194,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) if (!bus) return NULL; - /* - * Invoke the PCI device specific method (_DSM) #5 'Ignore PCI Boot - * Configuration', which tells us whether the firmware wants us to - * preserve the configuration of the PCI resource tree for this root - * bridge. - */ - obj = acpi_evaluate_dsm(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1, - IGNORE_PCI_BOOT_CONFIG_DSM, NULL); - if (obj && obj->type == ACPI_TYPE_INTEGER && obj->integer.value == 0) { - /* preserve existing resource assignment */ - pci_bus_claim_resources(bus); - } else { - /* reconfigure the resource tree from scratch */ - pci_bus_size_bridges(bus); - pci_bus_assign_resources(bus); - } - ACPI_FREE(obj); + pci_bus_size_bridges(bus); + pci_bus_assign_resources(bus); list_for_each_entry(child, &bus->children, node) pcie_bus_configure_settings(child); diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index cbaecde2977e..8082b612f561 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h @@ -107,7 +107,6 @@ static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { } #endif extern const guid_t pci_acpi_dsm_guid; -#define IGNORE_PCI_BOOT_CONFIG_DSM 0x05 #define DEVICE_LABEL_DSM 0x07 #define RESET_DELAY_DSM 0x08 #define FUNCTION_DELAY_DSM 0x09 -- GitLab