aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/m68k/mm/kmap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/m68k/mm/kmap.c b/arch/m68k/mm/kmap.c
index 85ad19a0ac79..43ffab048724 100644
--- a/arch/m68k/mm/kmap.c
+++ b/arch/m68k/mm/kmap.c
@@ -259,13 +259,15 @@ void __iounmap(void *addr, unsigned long size)
259 259
260 if (CPU_IS_020_OR_030) { 260 if (CPU_IS_020_OR_030) {
261 int pmd_off = (virtaddr/PTRTREESIZE) & 15; 261 int pmd_off = (virtaddr/PTRTREESIZE) & 15;
262 int pmd_type = pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK;
262 263
263 if ((pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK) == _PAGE_PRESENT) { 264 if (pmd_type == _PAGE_PRESENT) {
264 pmd_dir->pmd[pmd_off] = 0; 265 pmd_dir->pmd[pmd_off] = 0;
265 virtaddr += PTRTREESIZE; 266 virtaddr += PTRTREESIZE;
266 size -= PTRTREESIZE; 267 size -= PTRTREESIZE;
267 continue; 268 continue;
268 } 269 } else if (pmd_type == 0)
270 continue;
269 } 271 }
270 272
271 if (pmd_bad(*pmd_dir)) { 273 if (pmd_bad(*pmd_dir)) {