diff options
author | Alistair Popple <alistair@popple.id.au> | 2013-09-23 06:04:55 +0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2013-10-11 09:48:42 +0400 |
commit | 044cb69c53f286673b6809641f9c0ce929f9f221 (patch) | |
tree | 7cf712cb62294a567826a77a29a197d3f897d6e3 /arch/powerpc/platforms/powernv | |
parent | 1cc79bc80606229b0e7e56c76ee3cb3594409aa9 (diff) | |
download | linux-044cb69c53f286673b6809641f9c0ce929f9f221.tar.xz |
powerpc: Little endian fix for arch/powerpc/platforms/powernv/pci.c
Signed-off-by: Alistair Popple <alistair@popple.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/powernv')
-rw-r--r-- | arch/powerpc/platforms/powernv/pci.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/powernv/pci.c b/arch/powerpc/platforms/powernv/pci.c index a28d3b5e6393..912221565c5c 100644 --- a/arch/powerpc/platforms/powernv/pci.c +++ b/arch/powerpc/platforms/powernv/pci.c @@ -462,8 +462,8 @@ void pnv_pci_setup_iommu_table(struct iommu_table *tbl, static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose) { struct iommu_table *tbl; - const __be64 *basep, *swinvp; - const __be32 *sizep; + const __be64 *basep; + const __be32 *sizep, *swinvp; basep = of_get_property(hose->dn, "linux,tce-base", NULL); sizep = of_get_property(hose->dn, "linux,tce-size", NULL); @@ -484,8 +484,9 @@ static struct iommu_table *pnv_pci_setup_bml_iommu(struct pci_controller *hose) swinvp = of_get_property(hose->dn, "linux,tce-sw-invalidate-info", NULL); if (swinvp) { - tbl->it_busno = swinvp[1]; - tbl->it_index = (unsigned long)ioremap(swinvp[0], 8); + tbl->it_busno = of_read_ulong(&swinvp[1], 2); + tbl->it_index = + (unsigned long)ioremap(of_read_number(swinvp, 2), 8); tbl->it_type = TCE_PCI_SWINV_CREATE | TCE_PCI_SWINV_FREE; } return tbl; |