summaryrefslogtreecommitdiffstats
path: root/include/asm-x86/page_32.h
diff options
context:
space:
mode:
authorVegard Nossum <vegard.nossum@gmail.com>2008-10-03 17:54:25 +0200
committerIngo Molnar <mingo@elte.hu>2008-10-13 10:33:15 +0200
commitaf5c2bd16ac2e5688c3bf46ea1f95112d696d294 (patch)
tree80e08edc5c93999f083039a81b65fbf05d47954b /include/asm-x86/page_32.h
parentx86: allow number of additional hotplug CPUs to be set at compile time, V2 (diff)
downloadlinux-af5c2bd16ac2e5688c3bf46ea1f95112d696d294.tar.xz
linux-af5c2bd16ac2e5688c3bf46ea1f95112d696d294.zip
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>
Diffstat (limited to 'include/asm-x86/page_32.h')
-rw-r--r--include/asm-x86/page_32.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-x86/page_32.h b/include/asm-x86/page_32.h
index 9c5a737a9af9..5d6a68a1067a 100644
--- a/include/asm-x86/page_32.h
+++ b/include/asm-x86/page_32.h
@@ -73,11 +73,11 @@ typedef struct page *pgtable_t;
#endif
#ifndef __ASSEMBLY__
-#define __phys_addr_const(x) ((x) - PAGE_OFFSET)
+#define __phys_addr_nodebug(x) ((x) - PAGE_OFFSET)
#ifdef CONFIG_DEBUG_VIRTUAL
extern unsigned long __phys_addr(unsigned long);
#else
-#define __phys_addr(x) ((x) - PAGE_OFFSET)
+#define __phys_addr(x) __phys_addr_nodebug(x)
#endif
#define __phys_reloc_hide(x) RELOC_HIDE((x), 0)