소스 검색

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>
Suman Anna 14 년 전
부모
커밋
7e20b6f39a
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      arch/arm/mach-omap2/iommu2.c

+ 2 - 2
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;
 }