From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org
Subject: [PATCH 6/7] ia64/PCI: print resources consistently with %pRt
Date: Tue, 06 Oct 2009 15:33:54 -0600 [thread overview]
Message-ID: <20091006213354.4272.70294.stgit@bob.kio> (raw)
In-Reply-To: <20091006213259.4272.68068.stgit@bob.kio>
This uses %pRt to print additional resource information (type, size,
prefetchability, etc.) consistently.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
---
arch/ia64/pci/pci.c | 21 ++++++++++++++++-----
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 7de76dd..0f90259 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -126,6 +126,7 @@ alloc_pci_controller (int seg)
}
struct pci_root_info {
+ struct acpi_device *bridge;
struct pci_controller *controller;
char *name;
};
@@ -292,9 +293,19 @@ static __devinit acpi_status add_window(struct acpi_resource *res, void *data)
window->offset = offset;
if (insert_resource(root, &window->resource)) {
- printk(KERN_ERR "alloc 0x%llx-0x%llx from %s for %s failed\n",
- window->resource.start, window->resource.end,
- root->name, info->name);
+ dev_err(&info->bridge->dev, "can't allocate %pRt\n",
+ &window->resource);
+ } 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;
@@ -314,8 +325,7 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl)
(res->end - res->start < 16))
continue;
if (j >= PCI_BUS_NUM_RESOURCES) {
- printk("Ignoring range [%#llx-%#llx] (%lx)\n",
- res->start, res->end, res->flags);
+ dev_warn(&bus->dev, "ignoring %pRf (no space)\n", res);
continue;
}
bus->resource[j++] = res;
@@ -359,6 +369,7 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus)
goto out3;
sprintf(name, "PCI Bus %04x:%02x", domain, bus);
+ info.bridge = device;
info.controller = controller;
info.name = name;
acpi_walk_resources(device->handle, METHOD_NAME__CRS,
next prev parent reply other threads:[~2009-10-06 21:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-06 21:33 [PATCH 0/7] PCI, PNP: print resources consistently Bjorn Helgaas
2009-10-06 21:33 ` [PATCH 1/7] vsprintf: fix io/mem resource width Bjorn Helgaas
2009-10-26 20:40 ` Jesse Barnes
2009-10-06 21:33 ` [PATCH 2/7] vsprintf: add %pR support for IRQ and DMA resources Bjorn Helgaas
2009-10-06 21:33 ` [PATCH 3/7] vsprintf: add %pRt, %pRf to print struct resource details Bjorn Helgaas
2009-10-06 21:33 ` [PATCH 4/7] PCI: print resources consistently with %pRt Bjorn Helgaas
2009-10-06 21:33 ` [PATCH 5/7] x86/PCI: " Bjorn Helgaas
2009-10-07 18:43 ` Yinghai Lu
2009-10-07 19:15 ` Bjorn Helgaas
2009-10-09 21:14 ` Len Brown
2009-10-10 15:36 ` Bjorn Helgaas
2009-10-06 21:33 ` Bjorn Helgaas [this message]
2009-10-06 21:34 ` [PATCH 7/7] PNP: " Bjorn Helgaas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091006213354.4272.70294.stgit@bob.kio \
--to=bjorn.helgaas@hp.com \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).