Skip to content

Commit

Permalink
Revert "arm64: acpi/pci: invoke _DSM whether to preserve firmware PCI…
Browse files Browse the repository at this point in the history
… setup"

This reverts commit 0a74aec.
  • Loading branch information
ozbenh authored and shaoyingxu committed Nov 23, 2024
1 parent f3d3602 commit b3435a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 deletions.
20 changes: 2 additions & 18 deletions arch/arm64/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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);
Expand Down
7 changes: 3 additions & 4 deletions include/linux/pci-acpi.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ 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
#define DEVICE_LABEL_DSM 0x07
#define RESET_DELAY_DSM 0x08
#define FUNCTION_DELAY_DSM 0x09

#else /* CONFIG_ACPI */
static inline void acpi_pci_add_bus(struct pci_bus *bus) { }
Expand Down

0 comments on commit b3435a8

Please sign in to comment.