]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/acpi/pci_root.c
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux.git] / drivers / acpi / pci_root.c
index 39f5d172e84fef5a8c09e530367f4a5b4aaec47e..314a187ed5728196daea3d2469d5908c3a538626 100644 (file)
@@ -881,6 +881,7 @@ 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;
@@ -917,6 +918,17 @@ struct pci_bus *acpi_pci_root_create(struct acpi_pci_root *root,
        if (!(root->osc_control_set & OSC_PCI_EXPRESS_LTR_CONTROL))
                host_bridge->native_ltr = 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(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)
+               host_bridge->preserve_config = 1;
+       ACPI_FREE(obj);
+
        pci_scan_child_bus(bus);
        pci_set_host_bridge_release(host_bridge, acpi_pci_root_release_info,
                                    info);