diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2012-03-16 17:48:09 -0600 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2012-03-20 10:41:44 -0700 |
commit | 38973ba7903fa0660a31b2bdc50ff711ec8d08c9 (patch) | |
tree | 3035998567d13979639f24d99a5dd185d1679123 /arch/powerpc/kernel/pci_32.c | |
parent | d85c6d97d3d2601332f8250f06738cdeb4da71d2 (diff) | |
download | blackbird-op-linux-38973ba7903fa0660a31b2bdc50ff711ec8d08c9.tar.gz blackbird-op-linux-38973ba7903fa0660a31b2bdc50ff711ec8d08c9.zip |
powerpc/PCI: compute I/O space bus-to-resource offset consistently
Make sure we compute CPU addresses (resource start/end) the same way both
when we set up the I/O aperture (hose->io_resource) and when we use
pcibios_bus_to_resource() to convert BAR values into resources.
This fixes a build failure ("cast from pointer to integer of different
size" in configs where resource_size_t is 64 bits but pointers are 32 bits)
I introduced in 6c5705fec63d.
Acked-By: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/powerpc/kernel/pci_32.c')
-rw-r--r-- | arch/powerpc/kernel/pci_32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c index fdd1a3d951dc..4b06ec5a502e 100644 --- a/arch/powerpc/kernel/pci_32.c +++ b/arch/powerpc/kernel/pci_32.c @@ -219,9 +219,9 @@ void __devinit pcibios_setup_phb_io_space(struct pci_controller *hose) struct resource *res = &hose->io_resource; /* Fixup IO space offset */ - io_offset = (unsigned long)hose->io_base_virt - isa_io_base; - res->start = (res->start + io_offset) & 0xffffffffu; - res->end = (res->end + io_offset) & 0xffffffffu; + io_offset = pcibios_io_space_offset(hose); + res->start += io_offset; + res->end += io_offset; } static int __init pcibios_init(void) |