]> Git Repo - linux.git/commitdiff
omap: iommu: fix pte programming
authorSuman Anna <[email protected]>
Wed, 4 May 2011 22:45:37 +0000 (17:45 -0500)
committerOhad Ben-Cohen <[email protected]>
Mon, 4 Jul 2011 12:07:45 +0000 (15:07 +0300)
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 <[email protected]>
Acked-by: Hiroshi DOYU <[email protected]>
Signed-off-by: Ohad Ben-Cohen <[email protected]>
arch/arm/mach-omap2/iommu2.c

index adb083e41acd13bc05c6b7cc54de8b6130dee370..f286012783c6c99a9e1cbed453aecdeed43b5e3c 100644 (file)
@@ -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;
 }
 
This page took 0.072372 seconds and 4 git commands to generate.