diff mbox

[1/3] omap iommu: cleanup iommu page address mask and definitions

Message ID 20100113.141828.59662176.Hiroshi.DOYU@nokia.com (mailing list archive)
State Accepted
Commit b816b551d730ef50548cf35031832c4882823808
Delegated to: Tony Lindgren
Headers show

Commit Message

Hiroshi DOYU Jan. 13, 2010, 12:18 p.m. UTC
None
diff mbox

Patch

From 0f299c722404f367733da07125b6e4b6c722432b Mon Sep 17 00:00:00 2001
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Date: Fri, 8 Jan 2010 18:54:25 +0200
Subject: [PATCH 3/3] omap iommu: fix incorrect address for supersection 1st entry

From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>

There was a potential risk that the following "memset" could override
its range if a given address was not the 1st entry of a
supersection. This is not the case for "iovmm".

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Hari Nagalla <hnagalla@ti.com>
---
 arch/arm/plat-omap/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c
index ccf25b3..ce0072a 100644
--- a/arch/arm/plat-omap/iommu.c
+++ b/arch/arm/plat-omap/iommu.c
@@ -667,7 +667,7 @@  static size_t iopgtable_clear_entry_core(struct iommu *obj, u32 da)
 		if ((*iopgd & IOPGD_SUPER) == IOPGD_SUPER) {
 			nent *= 16;
 			/* rewind to the 1st entry */
-			iopgd = (u32 *)((u32)iopgd & IOSUPER_MASK);
+			iopgd = iopgd_offset(obj, (da & IOSUPER_MASK));
 		}
 		bytes *= nent;
 	}
-- 
1.6.0.4