Explorar o código

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" <srinivas.pulukuru@ti.com>
Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Hiroshi DOYU %!s(int64=16) %!d(string=hai) anos
pai
achega
dcc730dc9d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      arch/arm/plat-omap/iommu.c

+ 1 - 1
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 */
 		nent = 1; /* for the next L1 entry */
 	} else {
 	} else {
 		bytes = IOPGD_SIZE;
 		bytes = IOPGD_SIZE;
-		if (*iopgd & IOPGD_SUPER) {
+		if ((*iopgd & IOPGD_SUPER) == IOPGD_SUPER) {
 			nent *= 16;
 			nent *= 16;
 			/* rewind to the 1st entry */
 			/* rewind to the 1st entry */
 			iopgd = (u32 *)((u32)iopgd & IOSUPER_MASK);
 			iopgd = (u32 *)((u32)iopgd & IOSUPER_MASK);