summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Hansen <haveblue@us.ibm.com>2005-03-07 17:38:15 -0800
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-03-07 17:38:15 -0800
commit70b833b54c4f72e2377cfd1fd7434ffdd413f869 (patch)
tree3011020e19e0291336050908abcf2784ad0a2b88
parentaf916f7d5ae50defc34c41d6d5e4d6fa4da73925 (diff)
[PATCH] x86: consolidate set_max_mapnr_init() implementations
discontig.c has its own version of set_max_mapnr_init(). However, all that it really does differently from the mm/init.c version is skip setting max_mapnr (which doesn't exist because there's no mem_map[]). Signed-off-by: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--arch/i386/mm/discontig.c9
-rw-r--r--arch/i386/mm/init.c11
2 files changed, 7 insertions, 13 deletions
diff --git a/arch/i386/mm/discontig.c b/arch/i386/mm/discontig.c
index 628194e70038..d901ea84df8f 100644
--- a/arch/i386/mm/discontig.c
+++ b/arch/i386/mm/discontig.c
@@ -364,12 +364,3 @@ void __init set_highmem_pages_init(int bad_ppro)
totalram_pages += totalhigh_pages;
#endif
}
-
-void __init set_max_mapnr_init(void)
-{
-#ifdef CONFIG_HIGHMEM
- num_physpages = highend_pfn;
-#else
- num_physpages = max_low_pfn;
-#endif
-}
diff --git a/arch/i386/mm/init.c b/arch/i386/mm/init.c
index fe4e6b7b677a..d8bdf33f5eeb 100644
--- a/arch/i386/mm/init.c
+++ b/arch/i386/mm/init.c
@@ -548,19 +548,22 @@ void __init test_wp_bit(void)
}
}
-#ifndef CONFIG_DISCONTIGMEM
static void __init set_max_mapnr_init(void)
{
#ifdef CONFIG_HIGHMEM
- max_mapnr = num_physpages = highend_pfn;
+ num_physpages = highend_pfn;
#else
- max_mapnr = num_physpages = max_low_pfn;
+ num_physpages = max_low_pfn;
+#endif
+#ifndef CONFIG_DISCONTIGMEM
+ max_mapnr = num_physpages;
#endif
}
+
+#ifndef CONFIG_DISCONTIGMEM
#define __free_all_bootmem() free_all_bootmem()
#else
#define __free_all_bootmem() free_all_bootmem_node(NODE_DATA(0))
-extern void set_max_mapnr_init(void);
#endif /* !CONFIG_DISCONTIGMEM */
static struct kcore_list kcore_mem, kcore_vmalloc;