x86: fix virt_addr_valid() with CONFIG_DEBUG_VIRTUAL=y, v2
authorVegard Nossum <vegard.nossum@gmail.com>
Fri, 3 Oct 2008 15:54:25 +0000 (17:54 +0200)
committerIngo Molnar <mingo@elte.hu>
Mon, 13 Oct 2008 08:33:15 +0000 (10:33 +0200)
commitaf5c2bd16ac2e5688c3bf46ea1f95112d696d294
tree80e08edc5c93999f083039a81b65fbf05d47954b
parent7f2f49a58283110083a7358d2d98025a11653373
x86: fix virt_addr_valid() with CONFIG_DEBUG_VIRTUAL=y, v2

virt_addr_valid() calls __pa(), which calls __phys_addr(). With
CONFIG_DEBUG_VIRTUAL=y, __phys_addr() will kill the kernel if the
address *isn't* valid. That's clearly wrong for virt_addr_valid().

We also incorporate the debugging checks into virt_addr_valid().

Signed-off-by: Vegard Nossum <vegardno@ben.ifi.uio.no>
Acked-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
arch/x86/kernel/doublefault_32.c
arch/x86/mm/ioremap.c
include/asm-x86/page.h
include/asm-x86/page_32.h