From 70e778ed547e2b4dede2c7528afa96b8a4139275 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Mon, 7 May 2007 15:16:23 +1000 Subject: [PATCH] --- yaml --- r: 55037 b: refs/heads/master c: 11fbb00c67e19737757e747ec7dd3ba8d584f5d1 h: refs/heads/master i: 55035: cc83e97b9ac4df2b96accb21fcd4b05a4a7140f9 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/pci_64.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 25ddb9c2f0d3..fdb046d75f07 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0bd15c4b503b971024a3962b6a6b34c1af0628bf +refs/heads/master: 11fbb00c67e19737757e747ec7dd3ba8d584f5d1 diff --git a/trunk/arch/powerpc/kernel/pci_64.c b/trunk/arch/powerpc/kernel/pci_64.c index 60d7d4baa227..706b7f3da5ff 100644 --- a/trunk/arch/powerpc/kernel/pci_64.c +++ b/trunk/arch/powerpc/kernel/pci_64.c @@ -1006,8 +1006,9 @@ void __devinit pci_process_bridge_OF_ranges(struct pci_controller *hose, switch ((pci_space >> 24) & 0x3) { case 1: /* I/O space */ - hose->io_base_phys = cpu_phys_addr; - hose->pci_io_size = size; + hose->io_base_phys = cpu_phys_addr - pci_addr; + /* handle from 0 to top of I/O window */ + hose->pci_io_size = pci_addr + size; res = &hose->io_resource; res->flags = IORESOURCE_IO; @@ -1117,8 +1118,8 @@ static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys, } else { /* Root Bus */ res = &hose->io_resource; - *start_phys = hose->io_base_phys; - *start_virt = (unsigned long) hose->io_base_virt; + *start_phys = hose->io_base_phys + res->start; + *start_virt = (unsigned long) hose->io_base_virt + res->start; if (res->end > res->start) *size = res->end - res->start + 1; else {