From: Suman Anna Date: Wed, 4 May 2011 22:45:37 +0000 (-0500) Subject: omap: iommu: fix pte programming X-Git-Tag: v3.1-rc1~152^2~1^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e20b6f39aef541d890eba1fdf493f33b39d29e4;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.git 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 Acked-by: Hiroshi DOYU Signed-off-by: Ohad Ben-Cohen --- diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c index adb083e..f286012 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; }