From patchwork Tue Oct 6 21:33:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Helgaas X-Patchwork-Id: 52066 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n96LcKXC002198 for ; Tue, 6 Oct 2009 21:38:22 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933503AbZJFVed (ORCPT ); Tue, 6 Oct 2009 17:34:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S933293AbZJFVed (ORCPT ); Tue, 6 Oct 2009 17:34:33 -0400 Received: from g4t0015.houston.hp.com ([15.201.24.18]:12502 "EHLO g4t0015.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933472AbZJFVeb (ORCPT ); Tue, 6 Oct 2009 17:34:31 -0400 Received: from g1t0039.austin.hp.com (g1t0039.austin.hp.com [16.236.32.45]) by g4t0015.houston.hp.com (Postfix) with ESMTP id 62F4881C1; Tue, 6 Oct 2009 21:33:55 +0000 (UTC) Received: from ldl (linux.corp.hp.com [15.11.146.101]) by g1t0039.austin.hp.com (Postfix) with ESMTP id 3B67934471; Tue, 6 Oct 2009 21:33:55 +0000 (UTC) Received: from localhost (ldl.fc.hp.com [127.0.0.1]) by ldl (Postfix) with ESMTP id 19508CF0024; Tue, 6 Oct 2009 15:33:55 -0600 (MDT) Received: from ldl ([127.0.0.1]) by localhost (ldl.fc.hp.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hfCyb0pVp8oN; Tue, 6 Oct 2009 15:33:55 -0600 (MDT) Received: from eh.fc.hp.com (eh.fc.hp.com [15.11.146.105]) by ldl (Postfix) with ESMTP id 03ED5CF0022; Tue, 6 Oct 2009 15:33:55 -0600 (MDT) Received: from bob.kio (localhost [127.0.0.1]) by eh.fc.hp.com (Postfix) with ESMTP id DCC9726157; Tue, 6 Oct 2009 15:33:54 -0600 (MDT) Subject: [PATCH 6/7] ia64/PCI: print resources consistently with %pRt To: Jesse Barnes From: Bjorn Helgaas Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Date: Tue, 06 Oct 2009 15:33:54 -0600 Message-ID: <20091006213354.4272.70294.stgit@bob.kio> In-Reply-To: <20091006213259.4272.68068.stgit@bob.kio> References: <20091006213259.4272.68068.stgit@bob.kio> User-Agent: StGit/0.14.3.386.gb02d MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org 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,