Thread (23 messages) 23 messages, 2 authors, 2014-07-24

[PATCH v2 12/18] powerpc/iommu: Fix missing permission bits in iommu_put_tce_user_mode()

From: Alexey Kardashevskiy <hidden>
Date: 2014-07-23 03:06:19
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Michael Ellerman, Linus Torvalds

This adds missing permission bits to the translated TCE.

Signed-off-by: Alexey Kardashevskiy <redacted>
---
 arch/powerpc/kernel/iommu.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/iommu.c b/arch/powerpc/kernel/iommu.c
index da04561..01ac319 100644
--- a/arch/powerpc/kernel/iommu.c
+++ b/arch/powerpc/kernel/iommu.c
@@ -1085,6 +1085,7 @@ int iommu_put_tce_user_mode(struct iommu_table *tbl, unsigned long entry,
 		return -EFAULT;
 	}
 	hwaddr = (unsigned long) page_address(page) + offset;
+	hwaddr |= tce & (TCE_PCI_READ | TCE_PCI_WRITE);
 
 	ret = iommu_tce_build(tbl, entry, hwaddr, direction);
 	if (ret)
-- 
2.0.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help