From: Dave Hansen <haveblue@us.ibm.com>

When CONFIG_HIGHMEM=y, but ZONE_NORMAL isn't quite full, there is, of
course, no actual memory at *high_memory.  This isn't a problem with normal
virt<->phys translations because it's never dereferenced, but
CONFIG_NONLINEAR is a bit more finicky.  So, don't do __va() in
non-existent addresses.

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/mm/init.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -puN arch/i386/mm/init.c~make-highmem_start-access-only-valid-addresses-i386 arch/i386/mm/init.c
--- 25/arch/i386/mm/init.c~make-highmem_start-access-only-valid-addresses-i386	2005-02-28 16:25:11.000000000 -0800
+++ 25-akpm/arch/i386/mm/init.c	2005-02-28 16:41:50.000000000 -0800
@@ -589,9 +589,9 @@ void __init mem_init(void)
 	set_max_mapnr_init();
 
 #ifdef CONFIG_HIGHMEM
-	high_memory = (void *) __va(highstart_pfn * PAGE_SIZE);
+	high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
 #else
-	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
+	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
 #endif
 
 	/* this will put all low memory onto the freelists */
_