--- arch/x86/mm/ioremap.c | 1 + include/asm-x86/page_32.h | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) Index: linux-2.6.25-rc8-mm2/arch/x86/mm/ioremap.c =================================================================== --- linux-2.6.25-rc8-mm2.orig/arch/x86/mm/ioremap.c 2008-04-14 20:05:19.155739948 -0700 +++ linux-2.6.25-rc8-mm2/arch/x86/mm/ioremap.c 2008-04-14 20:06:07.124508127 -0700 @@ -25,6 +25,7 @@ unsigned long __phys_addr(unsigned long x) { + VM_BUG_ON(is_vmalloc_addr((void *)x)); if (x >= __START_KERNEL_map) return x - __START_KERNEL_map + phys_base; return x - PAGE_OFFSET; Index: linux-2.6.25-rc8-mm2/include/asm-x86/page_32.h =================================================================== --- linux-2.6.25-rc8-mm2.orig/include/asm-x86/page_32.h 2008-04-14 20:06:59.175741419 -0700 +++ linux-2.6.25-rc8-mm2/include/asm-x86/page_32.h 2008-04-14 20:09:07.912000017 -0700 @@ -64,7 +64,12 @@ typedef struct page *pgtable_t; #endif #ifndef __ASSEMBLY__ -#define __phys_addr(x) ((x) - PAGE_OFFSET) +static inline unsigned long __phys_addr(unsigned long x) +{ + VM_BUG_ON(is_vmalloc_addr((void *)x)); + return x - PAGE_OFFSET; +} + #define __phys_reloc_hide(x) RELOC_HIDE((x), 0) #ifdef CONFIG_FLATMEM