summaryrefslogtreecommitdiff
path: root/arch/sh/kernel/setup.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-05-23 17:48:36 +0900
committerPaul Mundt <lethal@hera.kernel.org>2007-06-08 02:43:43 +0000
commitdfbb9042801eaeb4df9015bb86224291a39a0f52 (patch)
treefc762c923fbc48bd724e648ccb415307ba17086c /arch/sh/kernel/setup.c
parent5900711ad7173b1cf3ee72eb21572e20b263ca0d (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.c8
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)
bootmap_size = init_bootmem_node(NODE_DATA(0), start_pfn,
min_low_pfn, max_low_pfn);
+ add_active_range(0, min_low_pfn, max_low_pfn);
register_bootmem_low_pages();
node_set_online(0);
@@ -192,6 +193,7 @@ static void __init setup_memory(void)
*/
start_pfn = PFN_UP(__pa(_end));
setup_bootmem_allocator(start_pfn);
+ sparse_memory_present_with_active_regions(0);
}
#else
extern void __init setup_memory(void);
@@ -250,8 +252,9 @@ void __init setup_arch(char **cmdline_p)
min_low_pfn = __MEMORY_START >> PAGE_SHIFT;
nodes_clear(node_online_map);
+
+ /* Setup bootmem with available RAM */
setup_memory();
- paging_init();
sparse_init();
#ifdef CONFIG_DUMMY_CONSOLE
@@ -261,8 +264,9 @@ void __init setup_arch(char **cmdline_p)
/* Perform the machine specific initialisation */
if (likely(sh_mv.mv_setup))
sh_mv.mv_setup(cmdline_p);
-}
+ paging_init();
+}
static const char *cpu_name[] = {
[CPU_SH7206] = "SH7206", [CPU_SH7619] = "SH7619",