From dcc730dc9d7614fdaf6bce73d6e8ffe47c8820b1 Mon Sep 17 00:00:00 2001 From: Hiroshi DOYU Date: Thu, 22 Oct 2009 14:46:32 -0700 Subject: [PATCH] omap: iommu: fix wrong condition check for SUPERSECTION A bit (2 << 0) is set both on SECTION and SUPERSECTION. To identify SUPERSECTION correctly, other bits should be compared too. Reported-by: "Srinivas Pulukuru" Signed-off-by: Hiroshi DOYU Signed-off-by: Tony Lindgren --- arch/arm/plat-omap/iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/plat-omap/iommu.c b/arch/arm/plat-omap/iommu.c index 4b6012707307..94584f167a82 100644 --- a/arch/arm/plat-omap/iommu.c +++ b/arch/arm/plat-omap/iommu.c @@ -664,7 +664,7 @@ static size_t iopgtable_clear_entry_core(struct iommu *obj, u32 da) nent = 1; /* for the next L1 entry */ } else { bytes = IOPGD_SIZE; - if (*iopgd & IOPGD_SUPER) { + if ((*iopgd & IOPGD_SUPER) == IOPGD_SUPER) { nent *= 16; /* rewind to the 1st entry */ iopgd = (u32 *)((u32)iopgd & IOSUPER_MASK);