diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:05:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-26 22:05:19 -0500 |
commit | 552d2f841e3f0f45eac86ff93e230db0b0a67a99 (patch) | |
tree | c47fabd409b3dd92965017dfc1c82df1d35579a0 /arch/mips/kernel/setup.c | |
parent | 09cfd929860532f95c9944d39abbb043b8082f36 (diff) | |
parent | b1e3afa001db8845eb60981f6ab925503ed94e53 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[MIPS] vpe: Add missing "space"
[MIPS] Compliment va_start() with va_end().
[MIPS] IP22: Fix broken eeprom access by using __raw_readl/__raw_writel
[MIPS] IP22: Fix broken EISA interrupt setup by switching to generic i8259
[MIPS] 64-bit Sibyte kernels need DMA32.
[MIPS] Only build r4k clocksource for systems that work ok with it.
[MIPS] Handle R4000/R4400 mfc0 from count register.
[MIPS] Fix possible hang in LL/SC futex loops.
[MIPS] Fix context DSP context / TLS pointer switching bug for new threads.
[MIPS] IP32: More interrupt renumbering fixes.
[MIPS] time: MIPSsim's plat_time_init doesn't need to be irq safe.
[MIPS] time: Fix negated condition in cevt-r4k driver.
[MIPS] Fix pcspeaker build.
Diffstat (limited to 'arch/mips/kernel/setup.c')
-rw-r--r-- | arch/mips/kernel/setup.c | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/arch/mips/kernel/setup.c b/arch/mips/kernel/setup.c index a06a27d6cfcd..7f6ddcb5d485 100644 --- a/arch/mips/kernel/setup.c +++ b/arch/mips/kernel/setup.c | |||
@@ -269,7 +269,7 @@ static void __init bootmem_init(void) | |||
269 | 269 | ||
270 | static void __init bootmem_init(void) | 270 | static void __init bootmem_init(void) |
271 | { | 271 | { |
272 | unsigned long reserved_end; | 272 | unsigned long init_begin, reserved_end; |
273 | unsigned long mapstart = ~0UL; | 273 | unsigned long mapstart = ~0UL; |
274 | unsigned long bootmap_size; | 274 | unsigned long bootmap_size; |
275 | int i; | 275 | int i; |
@@ -342,6 +342,35 @@ static void __init bootmem_init(void) | |||
342 | */ | 342 | */ |
343 | bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart, | 343 | bootmap_size = init_bootmem_node(NODE_DATA(0), mapstart, |
344 | min_low_pfn, max_low_pfn); | 344 | min_low_pfn, max_low_pfn); |
345 | |||
346 | |||
347 | init_begin = PFN_UP(__pa_symbol(&__init_begin)); | ||
348 | for (i = 0; i < boot_mem_map.nr_map; i++) { | ||
349 | unsigned long start, end; | ||
350 | |||
351 | start = PFN_UP(boot_mem_map.map[i].addr); | ||
352 | end = PFN_DOWN(boot_mem_map.map[i].addr | ||
353 | + boot_mem_map.map[i].size); | ||
354 | |||
355 | if (start <= init_begin) | ||
356 | start = init_begin; | ||
357 | if (start >= end) | ||
358 | continue; | ||
359 | |||
360 | #ifndef CONFIG_HIGHMEM | ||
361 | if (end > max_low_pfn) | ||
362 | end = max_low_pfn; | ||
363 | |||
364 | /* | ||
365 | * ... finally, is the area going away? | ||
366 | */ | ||
367 | if (end <= start) | ||
368 | continue; | ||
369 | #endif | ||
370 | |||
371 | add_active_range(0, start, end); | ||
372 | } | ||
373 | |||
345 | /* | 374 | /* |
346 | * Register fully available low RAM pages with the bootmem allocator. | 375 | * Register fully available low RAM pages with the bootmem allocator. |
347 | */ | 376 | */ |