提交 1fb992c0 编写于 作者: X Xiongfeng Wang 提交者: Xie XiuQi

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: NXiongfeng Wang <wangxiongfeng2@huawei.com>
Reviewed-by: NHanjun Guo <guohanjun@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 621a70fe
...@@ -169,7 +169,6 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) ...@@ -169,7 +169,6 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
struct acpi_pci_generic_root_info *ri; struct acpi_pci_generic_root_info *ri;
struct pci_bus *bus, *child; struct pci_bus *bus, *child;
struct acpi_pci_root_ops *root_ops; struct acpi_pci_root_ops *root_ops;
union acpi_object *obj;
ri = kzalloc_node(sizeof(*ri), GFP_KERNEL, node); ri = kzalloc_node(sizeof(*ri), GFP_KERNEL, node);
if (!ri) if (!ri)
...@@ -195,23 +194,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root) ...@@ -195,23 +194,8 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
if (!bus) if (!bus)
return NULL; return NULL;
/* pci_bus_size_bridges(bus);
* Invoke the PCI device specific method (_DSM) #5 'Ignore PCI Boot pci_bus_assign_resources(bus);
* 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);
list_for_each_entry(child, &bus->children, node) list_for_each_entry(child, &bus->children, node)
pcie_bus_configure_settings(child); pcie_bus_configure_settings(child);
......
...@@ -107,7 +107,6 @@ static inline void acpiphp_check_host_bridge(struct acpi_device *adev) { } ...@@ -107,7 +107,6 @@ 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 #define DEVICE_LABEL_DSM 0x07
#define RESET_DELAY_DSM 0x08 #define RESET_DELAY_DSM 0x08
#define FUNCTION_DELAY_DSM 0x09 #define FUNCTION_DELAY_DSM 0x09
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册