From 9d7d5db8e78ef1b67690bbffa5af60016d8e279d Mon Sep 17 00:00:00 2001 From: Vidya Sagar Date: Wed, 8 May 2024 23:11:35 +0530 Subject: PCI: Move PRESERVE_BOOT_CONFIG _DSM evaluation to pci_register_host_bridge() Move the PRESERVE_BOOT_CONFIG _DSM evaluation from acpi_pci_root_create() to pci_register_host_bridge(). This will help unify the ACPI _DSM path and the DT-based "linux,pci-probe-only" paths. This should be safe because it happens earlier than it used to: acpi_pci_root_create pci_create_root_bus pci_register_host_bridge + bridge->preserve_config = pci_preserve_config(bridge) pci_acpi_preserve_config + acpi_evaluate_dsm_typed(DSM_PCI_PRESERVE_BOOT_CONFIG) - acpi_evaluate_dsm_typed(DSM_PCI_PRESERVE_BOOT_CONFIG) No functional change intended. Link: https://lore.kernel.org/r/20240508174138.3630283-2-vidyas@nvidia.com Signed-off-by: Vidya Sagar Signed-off-by: Bjorn Helgaas --- drivers/acpi/pci_root.c | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 58b89b8d950e..ddc2b3e89111 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -1008,7 +1008,6 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, int node = acpi_get_node(device->handle); struct pci_bus *bus; struct pci_host_bridge *host_bridge; - union acpi_object *obj; info->root = root; info->bridge = device; @@ -1050,17 +1049,6 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root, if (!(root->osc_ext_control_set & OSC_CXL_ERROR_REPORTING_CONTROL)) host_bridge->native_cxl_error = 0; - /* - * Evaluate the "PCI Boot Configuration" _DSM Function. If it - * exists and returns 0, we must preserve any PCI resource - * assignments made by firmware for this host bridge. - */ - obj = acpi_evaluate_dsm_typed(ACPI_HANDLE(bus->bridge), &pci_acpi_dsm_guid, 1, - DSM_PCI_PRESERVE_BOOT_CONFIG, NULL, ACPI_TYPE_INTEGER); - if (obj && obj->integer.value == 0) - host_bridge->preserve_config = 1; - ACPI_FREE(obj); - acpi_dev_power_up_children_with_adr(device); pci_scan_child_bus(bus); -- cgit v1.2.3 From 88f2ab39990a3ab8b13c3cb6e276459a1a6c370b Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Thu, 9 May 2024 01:08:58 +0100 Subject: ACPI: PCI: Remove unused struct 'acpi_handle_node' 'acpi_handle_node' is unused since 63f534b8bad9 ("ACPI: PCI: Rework acpi_get_pci_dev()"). Remove it. Link: https://lore.kernel.org/r/20240509000858.204114-1-linux@treblig.org Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Bjorn Helgaas Reviewed-by: Jonathan Cameron --- drivers/acpi/pci_root.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'drivers/acpi') diff --git a/drivers/acpi/pci_root.c b/drivers/acpi/pci_root.c index 58b89b8d950e..59e6955e24ed 100644 --- a/drivers/acpi/pci_root.c +++ b/drivers/acpi/pci_root.c @@ -293,11 +293,6 @@ struct acpi_pci_root *acpi_pci_find_root(acpi_handle handle) } EXPORT_SYMBOL_GPL(acpi_pci_find_root); -struct acpi_handle_node { - struct list_head node; - acpi_handle handle; -}; - /** * acpi_get_pci_dev - convert ACPI CA handle to struct pci_dev * @handle: the handle in question -- cgit v1.2.3