]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mm/alpha: unify mem_init() for both UMA and NUMA architectures
authorJiang Liu <liuj97@gmail.com>
Thu, 27 Jun 2013 23:52:07 +0000 (09:52 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 28 Jun 2013 06:37:53 +0000 (16:37 +1000)
Now mem_init() for both Alpha UMA and Alpha NUMA are the same, so unify it
to reduce duplicated code.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
arch/alpha/mm/init.c
arch/alpha/mm/numa.c

index af91010990b06ff072dcb94fc3a73c6bc6dcf0b6..a1bea91df56ab996b92f33b0cfcd6738e4d2c072 100644 (file)
@@ -276,17 +276,14 @@ srm_paging_stop (void)
 }
 #endif
 
-#ifndef CONFIG_DISCONTIGMEM
 void __init
 mem_init(void)
 {
-       max_mapnr = max_low_pfn;
-       free_all_bootmem();
+       set_max_mapnr(max_low_pfn);
        high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
-
+       free_all_bootmem();
        mem_init_print_info(NULL);
 }
-#endif /* CONFIG_DISCONTIGMEM */
 
 void
 free_initmem(void)
index 0894b3a8b70f29eb8c47cd4d52acdb70946cde0a..d543d71c28b4e4ce08e30587e41bae3786a35f7f 100644 (file)
@@ -319,13 +319,3 @@ void __init paging_init(void)
        /* Initialize the kernel's ZERO_PGE. */
        memset((void *)ZERO_PGE, 0, PAGE_SIZE);
 }
-
-void __init mem_init(void)
-{
-       high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
-       free_all_bootmem();
-       mem_init_print_info(NULL);
-#if 0
-       mem_stress();
-#endif
-}