[PATCH 4/5] powerpc: Move sparse_init() into initmem_init
Anton Blanchard
anton at samba.org
Wed Sep 17 15:58:23 EST 2014
We did part of sparse initialisation in setup_arch and part in
initmem_init. Put them together.
Signed-off-by: Anton Blanchard <anton at samba.org>
---
arch/powerpc/kernel/setup_64.c | 1 -
arch/powerpc/mm/mem.c | 1 +
arch/powerpc/mm/numa.c | 2 ++
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index 9f8f472..8bc8f77 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -682,7 +682,6 @@ void __init setup_arch(char **cmdline_p)
emergency_stack_init();
initmem_init();
- sparse_init();
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
diff --git a/arch/powerpc/mm/mem.c b/arch/powerpc/mm/mem.c
index aa067b7..abbc55d 100644
--- a/arch/powerpc/mm/mem.c
+++ b/arch/powerpc/mm/mem.c
@@ -195,6 +195,7 @@ void __init initmem_init(void)
/* XXX need to clip this if using highmem? */
sparse_memory_present_with_active_regions(0);
+ sparse_init();
}
/* mark pages that don't exist as nosave */
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 4f9c18a..52559ff 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -964,6 +964,8 @@ void __init initmem_init(void)
sparse_memory_present_with_active_regions(nid);
}
+ sparse_init();
+
setup_node_to_cpumask_map();
reset_numa_cpu_lookup_table();
--
1.9.1
More information about the Linuxppc-dev
mailing list