Commit 928a40a4 authored by Linus Torvalds's avatar Linus Torvalds

Use "request_resource()" to properly fix up PCI resource clashes.

This is made possible by the previous resource allocation ordering
patch.

Now that we run the pre-existing PCI resource discovery _before_
ACPI resources have been added, we should not "insert" the resources
into any existing tree. If they clash with existing resources, we
should re-allocate them (later, when we have the full resource map).
parent a06a3014
...@@ -142,7 +142,7 @@ static void __init pcibios_allocate_resources(int pass) ...@@ -142,7 +142,7 @@ static void __init pcibios_allocate_resources(int pass)
DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n", DBG("PCI: Resource %08lx-%08lx (f=%lx, d=%d, p=%d)\n",
r->start, r->end, r->flags, disabled, pass); r->start, r->end, r->flags, disabled, pass);
pr = pci_find_parent_resource(dev, r); pr = pci_find_parent_resource(dev, r);
if (!pr || insert_resource(pr, r) < 0) { if (!pr || request_resource(pr, r) < 0) {
printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev)); printk(KERN_ERR "PCI: Cannot allocate resource region %d of device %s\n", idx, pci_name(dev));
/* We'll assign a new address later */ /* We'll assign a new address later */
r->end -= r->start; r->end -= r->start;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment