[PATCH] omap: iommu: fix pte attributes for super section

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>From 5796d8d8a0ea5aee342b78ca6ead229971cff6c5 Mon Sep 17 00:00:00 2001
From: Suman Anna <s-anna@xxxxxx>
Date: Wed, 4 May 2011 17:45:37 -0500
Subject: [PATCH] omap: iommu: fix pte attributes for super section

The PTE programming causes a 16MB entry to be interpreted
as a 4K entry because of the bitwise check, and therefore does
not set the attributes properly in the first-level descriptor
table. The bitwise check has been replaced appropriately.

Signed-off-by: Suman Anna <s-anna@xxxxxx>
---
 arch/arm/mach-omap2/iommu2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/iommu2.c b/arch/arm/mach-omap2/iommu2.c
index adb083e..c21fbe6 100644
--- a/arch/arm/mach-omap2/iommu2.c
+++ b/arch/arm/mach-omap2/iommu2.c
@@ -225,7 +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;
 }
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux