Skip to content

Commit

Permalink
[PATCH] m68k: fix __iounmap for 030
Browse files Browse the repository at this point in the history
Ignore empty pmd entry during iomap (these are the holes between the
mappings).

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Roman Zippel authored and Linus Torvalds committed Jun 25, 2006
1 parent 6bf9f75 commit a7b1a1a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions arch/m68k/mm/kmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,15 @@ void __iounmap(void *addr, unsigned long size)

if (CPU_IS_020_OR_030) {
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;
virtaddr += PTRTREESIZE;
size -= PTRTREESIZE;
continue;
}
} else if (pmd_type == 0)
continue;
}

if (pmd_bad(*pmd_dir)) {
Expand Down

0 comments on commit a7b1a1a

Please sign in to comment.