aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/mm
diff options
context:
space:
mode:
authorJiang Liu <liuj97@gmail.com>2013-07-03 18:04:36 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-07-03 19:07:39 -0400
commit2fb1cd5a283a7c40457731415c6e6432f061edc2 (patch)
treeb85f17840ed12e2bbca04c063cb0405b1c61b941 /arch/alpha/mm
parente1280be0d8614be94e5bef48b6c830dfa03e82a7 (diff)
mm/alpha: unify mem_init() for both UMA and NUMA architectures
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> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/alpha/mm')
-rw-r--r--arch/alpha/mm/init.c7
-rw-r--r--arch/alpha/mm/numa.c10
2 files changed, 2 insertions, 15 deletions
diff --git a/arch/alpha/mm/init.c b/arch/alpha/mm/init.c
index af91010990b0..a1bea91df56a 100644
--- a/arch/alpha/mm/init.c
+++ b/arch/alpha/mm/init.c
@@ -276,17 +276,14 @@ srm_paging_stop (void)
276} 276}
277#endif 277#endif
278 278
279#ifndef CONFIG_DISCONTIGMEM
280void __init 279void __init
281mem_init(void) 280mem_init(void)
282{ 281{
283 max_mapnr = max_low_pfn; 282 set_max_mapnr(max_low_pfn);
284 free_all_bootmem();
285 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE); 283 high_memory = (void *) __va(max_low_pfn * PAGE_SIZE);
286 284 free_all_bootmem();
287 mem_init_print_info(NULL); 285 mem_init_print_info(NULL);
288} 286}
289#endif /* CONFIG_DISCONTIGMEM */
290 287
291void 288void
292free_initmem(void) 289free_initmem(void)
diff --git a/arch/alpha/mm/numa.c b/arch/alpha/mm/numa.c
index 0894b3a8b70f..d543d71c28b4 100644
--- a/arch/alpha/mm/numa.c
+++ b/arch/alpha/mm/numa.c
@@ -319,13 +319,3 @@ void __init paging_init(void)
319 /* Initialize the kernel's ZERO_PGE. */ 319 /* Initialize the kernel's ZERO_PGE. */
320 memset((void *)ZERO_PGE, 0, PAGE_SIZE); 320 memset((void *)ZERO_PGE, 0, PAGE_SIZE);
321} 321}
322
323void __init mem_init(void)
324{
325 high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
326 free_all_bootmem();
327 mem_init_print_info(NULL);
328#if 0
329 mem_stress();
330#endif
331}