powerpc/PCI: compute I/O space bus-to-resource offset consistently
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 16 Mar 2012 23:48:09 +0000 (17:48 -0600)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Tue, 20 Mar 2012 17:41:44 +0000 (10:41 -0700)
commit38973ba7903fa0660a31b2bdc50ff711ec8d08c9
tree3035998567d13979639f24d99a5dd185d1679123
parentd85c6d97d3d2601332f8250f06738cdeb4da71d2
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>
arch/powerpc/include/asm/pci.h
arch/powerpc/kernel/pci-common.c
arch/powerpc/kernel/pci_32.c
arch/powerpc/kernel/pci_64.c