Commit a7b1a1a3 authored by Roman Zippel's avatar Roman Zippel Committed by Linus Torvalds

[PATCH] m68k: fix __iounmap for 030

Ignore empty pmd entry during iomap (these are the holes between the
mappings).
Signed-off-by: default avatarRoman Zippel <zippel@linux-m68k.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 6bf9f755
...@@ -259,13 +259,15 @@ void __iounmap(void *addr, unsigned long size) ...@@ -259,13 +259,15 @@ void __iounmap(void *addr, unsigned long size)
if (CPU_IS_020_OR_030) { if (CPU_IS_020_OR_030) {
int pmd_off = (virtaddr/PTRTREESIZE) & 15; int pmd_off = (virtaddr/PTRTREESIZE) & 15;
int pmd_type = pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK;
if ((pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK) == _PAGE_PRESENT) { if (pmd_type == _PAGE_PRESENT) {
pmd_dir->pmd[pmd_off] = 0; pmd_dir->pmd[pmd_off] = 0;
virtaddr += PTRTREESIZE; virtaddr += PTRTREESIZE;
size -= PTRTREESIZE; size -= PTRTREESIZE;
continue; continue;
} } else if (pmd_type == 0)
continue;
} }
if (pmd_bad(*pmd_dir)) { if (pmd_bad(*pmd_dir)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment