mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-06 14:48:06 +00:00
powerpc/powernv: Fix it_ops::get() callback to return in cpu endian
The iommu_table_ops callbacks are declared CPU endian as they take and return "unsigned long"; underlying hardware tables are big-endian. However get() was missing be64_to_cpu(), this adds the missing conversion. The only caller of this is crash dump at arch/powerpc/kernel/iommu.c, iommu_table_clear() which only compares TCE to zero so this change should not cause behavioral change. Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru> Reviewed-by: David Gibson <david@gibson.dropbear.id.au> Acked-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
This commit is contained in:
parent
b3a7864c6f
commit
81d5fe1a3b
1 changed files with 1 additions and 1 deletions
|
@ -758,7 +758,7 @@ void pnv_tce_free(struct iommu_table *tbl, long index, long npages)
|
||||||
|
|
||||||
unsigned long pnv_tce_get(struct iommu_table *tbl, long index)
|
unsigned long pnv_tce_get(struct iommu_table *tbl, long index)
|
||||||
{
|
{
|
||||||
return *(pnv_tce(tbl, index - tbl->it_offset));
|
return be64_to_cpu(*(pnv_tce(tbl, index - tbl->it_offset)));
|
||||||
}
|
}
|
||||||
|
|
||||||
struct iommu_table *pnv_pci_table_alloc(int nid)
|
struct iommu_table *pnv_pci_table_alloc(int nid)
|
||||||
|
|
Loading…
Add table
Reference in a new issue