--- include/linux/mmzone.h	Tue Feb  1 14:37:26 2000
+++ include/linux/mmzone.h	Thu Feb  3 01:10:39 2000
@@ -102,9 +102,10 @@
 
 #define LOCAL_MAP_NR(kvaddr) \
 	(((unsigned long)(kvaddr)-LOCAL_BASE_ADDR((kvaddr))) >> PAGE_SHIFT)
-#define MAP_NR(kaddr)	(LOCAL_MAP_NR((kaddr)) + \
+#define MAP_NR(kaddr)	(((unsigned long)(kaddr) > (unsigned long)high_memory)\
+		? (max_mapnr + 1) : (LOCAL_MAP_NR((kaddr)) + \
 		(((unsigned long)ADDR_TO_MAPBASE((kaddr)) - PAGE_OFFSET) / \
-		sizeof(mem_map_t)))
+		sizeof(mem_map_t))))
 #define kern_addr_valid(addr)	((KVADDR_TO_NID((unsigned long)addr) >= \
 	numnodes) ? 0 : (test_bit(LOCAL_MAP_NR((addr)), \
 	NODE_DATA(KVADDR_TO_NID((unsigned long)addr))->valid_addr_bitmap)))
