--- linux-2.5.30-rmap-slablru/include/linux/mm.h~ Sat Aug 3 22:19:19 2002 +++ linux-2.5.30-rmap-slablru/include/linux/mm.h Tue Aug 6 23:11:56 2002 @@ -297,17 +297,13 @@ #define page_address(page) ((page)->virtual) -#elif defined(CONFIG_DISCONTIGMEM) - -extern unsigned long page_address(struct page * page); - -#else /* CONFIG_HIGHMEM || WANT_PAGE_VIRTUAL && !CONFIG_DISCONTIGMEM */ +#else /* CONFIG_HIGHMEM || WANT_PAGE_VIRTUAL */ #define page_address(page) \ __va( (((page) - page_zone(page)->zone_mem_map) << PAGE_SHIFT) \ + page_zone(page)->zone_start_paddr) -#endif /* CONFIG_HIGHMEM || WANT_PAGE_VIRTUAL && !CONFIG_DISCONTIGMEM */ +#endif /* CONFIG_HIGHMEM || WANT_PAGE_VIRTUAL */ /* * Error return values for the *_nopage functions --- linux-2.5.30-rmap-slablru/include/linux/mmzone.h~ Sat Aug 3 22:19:19 2002 +++ linux-2.5.30-rmap-slablru/include/linux/mmzone.h Tue Aug 6 23:13:13 2002 @@ -26,8 +26,6 @@ struct pglist_data; -#define MAX_CHUNKS_PER_NODE 8 - /* * On machines where it is needed (eg PCs) we divide physical memory * into multiple physical zones. On a PC we have 3 zones: @@ -88,13 +86,6 @@ */ struct pglist_data *zone_pgdat; struct page *zone_mem_map; - -#if defined(CONFIG_DISCONTIGMEM) && !defined(CONFIG_HIGHMEM) - struct page *zone_chunk_page_start[MAX_CHUNKS_PER_ZONE + 1]; - unsigned long zone_chunk_phys_start[MAX_CHUNKS_PER_ZONE]; - unsigned int zone_nr_chunks; -#endif - unsigned long zone_start_paddr; unsigned long zone_start_mapnr; --- linux-2.5.30-rmap-slablru/mm/numa.c~ Sat Aug 3 22:21:14 2002 +++ linux-2.5.30-rmap-slablru/mm/numa.c Tue Aug 6 23:21:06 2002 @@ -44,57 +44,6 @@ #define LONG_ALIGN(x) (((x)+(sizeof(long))-1)&~((sizeof(long))-1)) -#ifndef CONFIG_HIGHMEM -unsigned long page_address(struct page * page) -{ - struct zone_struct * zone; - struct page * chunk_page_start; - unsigned long chunk_phys_addr; - int idx_chunk; - - zone = page_zone(page); - /* - * We have to check if the page is on - * a chunk that contains pages from 2 zones. - */ - if(!(page < zone->zone_chunk_page_start[0])) - goto known_zone; - /* - * We need to get the previous zone. - * If there is no such zone, we are in trouble. - */ - if(!page->zone) - BUG(); - - zone = zone_table[(page->zone) - 1]; - - if(zone->zone_pgdat->node_id == page_zone(page)->zone_pgdat->node_id) - goto known_zone; - /* - * Getting here means we have a chunk spread over 2 nodes. - * That shouldn't happen. - */ - BUG(); - - known_zone: - for(idx_chunk = 0 ; idx_chunk < MAX_CHUNKS_PER_ZONE ; idx_chunk++){ - if(page >= zone->zone_chunk_page_start[idx_chunk] && - page < zone->zone_chunk_page_start[idx_chunk + 1]) - break; - } - /* - * We know which chunk the page belongs to. - */ - chunk_phys_addr = zone->zone_chunk_phys_start[idx_chunk]; - chunk_page_start = zone->zone_chunk_page_start[idx_chunk]; - return (unsigned long)__va(chunk_phys_addr + - ((page - chunk_page_start) << PAGE_SHIFT )); - - - -} -#endif - /* * Nodes can be initialized parallely, in no particular order. */