diff options
Diffstat (limited to 'arch/sh/kernel/setup.c')
-rw-r--r-- | arch/sh/kernel/setup.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/sh/kernel/setup.c b/arch/sh/kernel/setup.c index e3f0da7b865d..2c9ab2842765 100644 --- a/arch/sh/kernel/setup.c +++ b/arch/sh/kernel/setup.c | |||
@@ -4,7 +4,7 @@ | |||
4 | * This file handles the architecture-dependent parts of initialization | 4 | * This file handles the architecture-dependent parts of initialization |
5 | * | 5 | * |
6 | * Copyright (C) 1999 Niibe Yutaka | 6 | * Copyright (C) 1999 Niibe Yutaka |
7 | * Copyright (C) 2002 - 2007 Paul Mundt | 7 | * Copyright (C) 2002 - 2010 Paul Mundt |
8 | */ | 8 | */ |
9 | #include <linux/screen_info.h> | 9 | #include <linux/screen_info.h> |
10 | #include <linux/ioport.h> | 10 | #include <linux/ioport.h> |
@@ -41,6 +41,7 @@ | |||
41 | #include <asm/clock.h> | 41 | #include <asm/clock.h> |
42 | #include <asm/smp.h> | 42 | #include <asm/smp.h> |
43 | #include <asm/mmu_context.h> | 43 | #include <asm/mmu_context.h> |
44 | #include <asm/mmzone.h> | ||
44 | 45 | ||
45 | /* | 46 | /* |
46 | * Initialize loops_per_jiffy as 10000000 (1000MIPS). | 47 | * Initialize loops_per_jiffy as 10000000 (1000MIPS). |
@@ -247,7 +248,7 @@ void __init __add_active_range(unsigned int nid, unsigned long start_pfn, | |||
247 | add_active_range(nid, start_pfn, end_pfn); | 248 | add_active_range(nid, start_pfn, end_pfn); |
248 | } | 249 | } |
249 | 250 | ||
250 | void __init setup_bootmem_allocator(unsigned long free_pfn) | 251 | void __init do_init_bootmem(void) |
251 | { | 252 | { |
252 | unsigned long bootmap_size; | 253 | unsigned long bootmap_size; |
253 | unsigned long bootmap_pages, bootmem_paddr; | 254 | unsigned long bootmap_pages, bootmem_paddr; |
@@ -298,12 +299,9 @@ void __init setup_bootmem_allocator(unsigned long free_pfn) | |||
298 | sparse_memory_present_with_active_regions(0); | 299 | sparse_memory_present_with_active_regions(0); |
299 | } | 300 | } |
300 | 301 | ||
301 | #ifndef CONFIG_NEED_MULTIPLE_NODES | ||
302 | static void __init setup_memory(void) | 302 | static void __init setup_memory(void) |
303 | { | 303 | { |
304 | unsigned long start_pfn; | 304 | unsigned long start_pfn; |
305 | u64 base = min_low_pfn << PAGE_SHIFT; | ||
306 | u64 size = (max_low_pfn << PAGE_SHIFT) - base; | ||
307 | 305 | ||
308 | /* | 306 | /* |
309 | * Partially used pages are not usable - thus | 307 | * Partially used pages are not usable - thus |
@@ -311,8 +309,6 @@ static void __init setup_memory(void) | |||
311 | */ | 309 | */ |
312 | start_pfn = PFN_UP(__pa(_end)); | 310 | start_pfn = PFN_UP(__pa(_end)); |
313 | 311 | ||
314 | lmb_add(base, size); | ||
315 | |||
316 | /* | 312 | /* |
317 | * Reserve the kernel text and | 313 | * Reserve the kernel text and |
318 | * Reserve the bootmem bitmap. We do this in two steps (first step | 314 | * Reserve the bootmem bitmap. We do this in two steps (first step |
@@ -333,11 +329,9 @@ static void __init setup_memory(void) | |||
333 | lmb_analyze(); | 329 | lmb_analyze(); |
334 | lmb_dump_all(); | 330 | lmb_dump_all(); |
335 | 331 | ||
336 | setup_bootmem_allocator(start_pfn); | 332 | do_init_bootmem(); |
333 | plat_mem_setup(); | ||
337 | } | 334 | } |
338 | #else | ||
339 | extern void __init setup_memory(void); | ||
340 | #endif | ||
341 | 335 | ||
342 | /* | 336 | /* |
343 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by | 337 | * Note: elfcorehdr_addr is not just limited to vmcore. It is also used by |
@@ -358,7 +352,11 @@ static int __init parse_elfcorehdr(char *arg) | |||
358 | early_param("elfcorehdr", parse_elfcorehdr); | 352 | early_param("elfcorehdr", parse_elfcorehdr); |
359 | #endif | 353 | #endif |
360 | 354 | ||
361 | void __init __attribute__ ((weak)) plat_early_device_setup(void) | 355 | void __init __weak plat_early_device_setup(void) |
356 | { | ||
357 | } | ||
358 | |||
359 | void __init __weak plat_mem_setup(void) | ||
362 | { | 360 | { |
363 | } | 361 | } |
364 | 362 | ||
@@ -426,7 +424,10 @@ void __init setup_arch(char **cmdline_p) | |||
426 | /* Let earlyprintk output early console messages */ | 424 | /* Let earlyprintk output early console messages */ |
427 | early_platform_driver_probe("earlyprintk", 1, 1); | 425 | early_platform_driver_probe("earlyprintk", 1, 1); |
428 | 426 | ||
427 | lmb_init(); | ||
428 | |||
429 | sh_mv_setup(); | 429 | sh_mv_setup(); |
430 | sh_mv.mv_mem_init(); | ||
430 | 431 | ||
431 | /* | 432 | /* |
432 | * Find the highest page frame number we have available | 433 | * Find the highest page frame number we have available |
@@ -442,7 +443,6 @@ void __init setup_arch(char **cmdline_p) | |||
442 | nodes_clear(node_online_map); | 443 | nodes_clear(node_online_map); |
443 | 444 | ||
444 | pmb_init(); | 445 | pmb_init(); |
445 | lmb_init(); | ||
446 | setup_memory(); | 446 | setup_memory(); |
447 | sparse_init(); | 447 | sparse_init(); |
448 | 448 | ||