Commit 637b363e authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Jesse Barnes

ia64/PCI: print resources consistently with %pRt

This uses %pRt to print additional resource information (type, size,
prefetchability, etc.) consistently.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent 42887b29
...@@ -131,6 +131,7 @@ alloc_pci_controller (int seg) ...@@ -131,6 +131,7 @@ alloc_pci_controller (int seg)
} }
struct pci_root_info { struct pci_root_info {
struct acpi_device *bridge;
struct pci_controller *controller; struct pci_controller *controller;
char *name; char *name;
}; };
...@@ -297,9 +298,19 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data) ...@@ -297,9 +298,19 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
window->offset = offset; window->offset = offset;
if (insert_resource(root, &window->resource)) { if (insert_resource(root, &window->resource)) {
printk(KERN_ERR "alloc 0x%llx-0x%llx from %s for %s failed\n", dev_err(&info->bridge->dev, "can't allocate %pRt\n",
window->resource.start, window->resource.end, &window->resource);
root->name, info->name); } else {
if (offset)
dev_info(&info->bridge->dev, "host bridge window: %pRt "
"(PCI address [%#llx-%#llx])\n",
&window->resource,
window->resource.start - offset,
window->resource.end - offset);
else
dev_info(&info->bridge->dev,
"host bridge window: %pRt\n",
&window->resource);
} }
return AE_OK; return AE_OK;
...@@ -319,8 +330,7 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl) ...@@ -319,8 +330,7 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
(res->end - res->start < 16)) (res->end - res->start < 16))
continue; continue;
if (j >= PCI_BUS_NUM_RESOURCES) { if (j >= PCI_BUS_NUM_RESOURCES) {
printk("Ignoring range [%#llx-%#llx] (%lx)\n", dev_warn(&bus->dev, "ignoring %pRf (no space)\n", res);
res->start, res->end, res->flags);
continue; continue;
} }
bus->resource[j++] = res; bus->resource[j++] = res;
...@@ -364,6 +374,7 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) ...@@ -364,6 +374,7 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)
goto out3; goto out3;
sprintf(name, "PCI Bus %04x:%02x", domain, bus); sprintf(name, "PCI Bus %04x:%02x", domain, bus);
info.bridge = device;
info.controller = controller; info.controller = controller;
info.name = name; info.name = name;
acpi_walk_resources(device->handle, METHOD_NAME__CRS, acpi_walk_resources(device->handle, METHOD_NAME__CRS,
......
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