
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.

The arithmetic with void* and char* is the same, but I find it a little more
obvious what's goin on when char* is used explicitly. 

Signed-off-by: Dave Hansen <haveblue@us.ibm.com>
---

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

diff -puN arch/i386/mm/init.c~A3-highmem_start-valid_addrs arch/i386/mm/init.c
--- memhotplug/arch/i386/mm/init.c~A3-highmem_start-valid_addrs	2004-12-10 13:52:26.000000000 -0800
+++ memhotplug-dave/arch/i386/mm/init.c	2004-12-10 13:52:26.000000000 -0800
@@ -582,9 +582,9 @@ void __init mem_init(void)
 	set_max_mapnr_init();
 
 #ifdef CONFIG_HIGHMEM
-	high_memory = (void *) __va(highstart_pfn * PAGE_SIZE);
+	high_memory = (char *) __va(highstart_pfn * PAGE_SIZE - 1) + 1;
 #else
-	high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
+	high_memory = (char *) __va(max_low_pfn * PAGE_SIZE - 1) + 1;
 #endif
 
 	/* this will put all low memory onto the freelists */
_
