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

People love to do comparisons with highmem_start_page.  However, where
CONFIG_HIGHMEM=y and there is no actual highmem, there's no real page at
*highmem_start_page.

That's usually not a problem, but CONFIG_NONLINEAR is a bit more strict and
catches the bogus address tranlations.  

There are about a gillion different ways to find out of a 'struct page' is
highmem or not.  Why not just check page_flags?  Just use PageHighMem()
wherever there used to be a highmem_start_page comparison.  Then, kill off
highmem_start_page.

This removes more code than it adds, and gets rid of some nasty 
#ifdefs in .c files.

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

 25-akpm/arch/frv/mm/highmem.c |    4 ++--
 25-akpm/arch/frv/mm/init.c    |    5 -----
 2 files changed, 2 insertions(+), 7 deletions(-)

diff -puN arch/frv/mm/highmem.c~frv-kill-off-highmem_start_page arch/frv/mm/highmem.c
--- 25/arch/frv/mm/highmem.c~frv-kill-off-highmem_start_page	Wed Nov 17 14:18:55 2004
+++ 25-akpm/arch/frv/mm/highmem.c	Wed Nov 17 14:18:55 2004
@@ -13,7 +13,7 @@
 void *kmap(struct page *page)
 {
 	might_sleep();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return page_address(page);
 	return kmap_high(page);
 }
@@ -22,7 +22,7 @@ void kunmap(struct page *page)
 {
 	if (in_interrupt())
 		BUG();
-	if (page < highmem_start_page)
+	if (!PageHighMem(page))
 		return;
 	kunmap_high(page);
 }
diff -puN arch/frv/mm/init.c~frv-kill-off-highmem_start_page arch/frv/mm/init.c
--- 25/arch/frv/mm/init.c~frv-kill-off-highmem_start_page	Wed Nov 17 14:18:55 2004
+++ 25-akpm/arch/frv/mm/init.c	Wed Nov 17 14:18:55 2004
@@ -134,11 +134,6 @@ void __init paging_init(void)
 	free_area_init(zones_size);
 
 #ifdef CONFIG_MMU
-	/* high memory (if present) starts after the last mapped page
-	 * - this is used by kmap()
-	 */
-	highmem_start_page = mem_map + num_mappedpages;
-
 	/* initialise init's MMU context */
 	init_new_context(&init_task, &init_mm);
 #endif
_
