diff options
author | Paul Mundt <lethal@linux-sh.org> | 2007-05-23 04:48:36 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-06-07 22:43:43 -0400 |
commit | dfbb9042801eaeb4df9015bb86224291a39a0f52 (patch) | |
tree | fc762c923fbc48bd724e648ccb415307ba17086c /arch/sh/kernel/setup.c | |
parent | 5900711ad7173b1cf3ee72eb21572e20b263ca0d (diff) |
sh: sparsemem support.
This implements basic sparsemem support for SH. Presently this only
uses static sparsemem, and we still permit explicit selection of
flatmem. Those boards that want sparsemem can select it as usual.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index 6f1ea9b33374..3241a6274b81 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -128,6 +128,7 @@ void __init setup_bootmem_allocator(unsigned long start_pfn) | |||
128 | bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn, | 128 | bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn, |
129 | min_low_pfn, max_low_pfn); | 129 | min_low_pfn, max_low_pfn); |
130 | 130 | ||
131 | add_active_range(0, min_low_pfn, max_low_pfn); | ||
131 | register_bootmem_low_pages(); | 132 | register_bootmem_low_pages(); |
132 | 133 | ||
133 | node_set_online(0); | 134 | node_set_online(0); |
@@ -192,6 +193,7 @@ static void __init setup_memory(void) | |||
192 | */ | 193 | */ |
193 | start_pfn = PFN_UP(__pa(_end)); | 194 | start_pfn = PFN_UP(__pa(_end)); |
194 | setup_bootmem_allocator(start_pfn); | 195 | setup_bootmem_allocator(start_pfn); |
196 | sparse_memory_present_with_active_regions(0); | ||
195 | } | 197 | } |
196 | #else | 198 | #else |
197 | extern void __init setup_memory(void); | 199 | extern void __init setup_memory(void); |
@@ -250,8 +252,9 @@ void __init setup_arch(char **cmdline_p) | |||
250 | min_low_pfn = __MEMORY_START >> PAGE_SHIFT; | 252 | min_low_pfn = __MEMORY_START >> PAGE_SHIFT; |
251 | 253 | ||
252 | nodes_clear(node_online_map); | 254 | nodes_clear(node_online_map); |
255 | |||
256 | /* Setup bootmem with available RAM */ | ||
253 | setup_memory(); | 257 | setup_memory(); |
254 | paging_init(); | ||
255 | sparse_init(); | 258 | sparse_init(); |
256 | 259 | ||
257 | #ifdef CONFIG_DUMMY_CONSOLE | 260 | #ifdef CONFIG_DUMMY_CONSOLE |
@@ -261,8 +264,9 @@ void __init setup_arch(char **cmdline_p) | |||
261 | /* Perform the machine specific initialisation */ | 264 | /* Perform the machine specific initialisation */ |
262 | if (likely(sh_mv.mv_setup)) | 265 | if (likely(sh_mv.mv_setup)) |
263 | sh_mv.mv_setup(cmdline_p); | 266 | sh_mv.mv_setup(cmdline_p); |
264 | } | ||
265 | 267 | ||
268 | paging_init(); | ||
269 | } | ||
266 | 270 | ||
267 | static const char *cpu_name[] = { | 271 | static const char *cpu_name[] = { |
268 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", | 272 | [CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619", |