summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2011-05-04 17:45:37 -0500
committerOhad Ben-Cohen <ohad@wizery.com>2011-07-04 15:07:45 +0300
commit7e20b6f39aef541d890eba1fdf493f33b39d29e4 (patch)
tree83874cac3d3bbe9b0e61ce513f7237ca37178bd9
parent61c4f2c81c61f73549928dfd9f3e8f26aa36a8cf (diff)
downloadlinux-3.10-7e20b6f39aef541d890eba1fdf493f33b39d29e4.tar.gz
linux-3.10-7e20b6f39aef541d890eba1fdf493f33b39d29e4.tar.bz2
linux-3.10-7e20b6f39aef541d890eba1fdf493f33b39d29e4.zip
omap: iommu: fix pte programming
Fix the pte programming to set the page attributes correctly by replacing the bitwise check with an explicit values check. Otherwise, 16MB entries will be erroneously programmed like 4KB entries, which is not what the hardware expects. Signed-off-by: Suman Anna <s-anna@ti.com> Acked-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
-rw-r--r--arch/arm/mach-omap2/iommu2.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index adb083e41ac..f286012783c 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -225,8 +225,8 @@ static u32 omap2_get_pte_attr(struct iotlb_entry *e)
attr = e->mixed << 5;
attr |= e->endian;
attr |= e->elsz >> 3;
- attr <<= ((e->pgsz & MMU_CAM_PGSZ_4K) ? 0 : 6);
-
+ attr <<= (((e->pgsz == MMU_CAM_PGSZ_4K) ||
+ (e->pgsz == MMU_CAM_PGSZ_64K)) ? 0 : 6);
return attr;
}