Commit a7b1a1a3089aaf1168e3b68a40e98532063d7811
Committed by
Linus Torvalds
1 parent
6bf9f755c3
[PATCH] m68k: fix __iounmap for 030
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>
Showing 1 changed file with 4 additions and 2 deletions Side-by-side Diff
arch/m68k/mm/kmap.c
... | ... | @@ -259,13 +259,15 @@ |
259 | 259 | |
260 | 260 | if (CPU_IS_020_OR_030) { |
261 | 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 | 265 | pmd_dir->pmd[pmd_off] = 0; |
265 | 266 | virtaddr += PTRTREESIZE; |
266 | 267 | size -= PTRTREESIZE; |
267 | 268 | continue; |
268 | - } | |
269 | + } else if (pmd_type == 0) | |
270 | + continue; | |
269 | 271 | } |
270 | 272 | |
271 | 273 | if (pmd_bad(*pmd_dir)) { |