Skip to content

Commit

Permalink
x86/PCI: for host bridge address space collisions, show conflicting r…
Browse files Browse the repository at this point in the history
…esource

With insert_resource_conflict(), we can learn what the actual conflict is,
so print that info for debugging purposes.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Bjorn Helgaas authored and Jesse Barnes committed Mar 25, 2010
1 parent 99f4692 commit eb9fc8e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions arch/x86/pci/acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
struct acpi_resource_address64 addr;
acpi_status status;
unsigned long flags;
struct resource *root;
struct resource *root, *conflict;
u64 start, end;

status = resource_to_addr(acpi_res, &addr);
Expand Down Expand Up @@ -157,9 +157,12 @@ setup_resource(struct acpi_resource *acpi_res, void *data)
return AE_OK;
}

if (insert_resource(root, res)) {
conflict = insert_resource_conflict(root, res);
if (conflict) {
dev_err(&info->bridge->dev,
"can't allocate host bridge window %pR\n", res);
"address space collision: host bridge window %pR "
"conflicts with %s %pR\n",
res, conflict->name, conflict);
} else {
pci_bus_add_resource(info->bus, res, 0);
info->res_num++;
Expand Down

0 comments on commit eb9fc8e

Please sign in to comment.