提交 7e20b6f3 编写于 作者: S Suman Anna 提交者: Ohad Ben-Cohen

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: NSuman Anna <s-anna@ti.com>
Acked-by: NHiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: NOhad Ben-Cohen <ohad@wizery.com>
上级 61c4f2c8
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册