aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/setup.c
diff options
context:
space:
mode:
authorBernd Schmidt <bernd.schmidt@analog.com>2007-11-17 11:09:49 -0500
committerBryan Wu <bryan.wu@analog.com>2007-11-17 11:09:49 -0500
commitaf8a5af3ff73055f7554a3a66307ad58792f09d5 (patch)
treeeb9d60acd20667fbf4e552d7e7417a1c520b6a60 /arch/blackfin/kernel/setup.c
parenta961d659637b7d77c916597017e2e3730859c333 (diff)
Blackfin arch: fix bug kernel not to boot up with mtd filesystems
Revert this patch: move the init sections to the end of memory, so that after they are free, run time memory is all continugous - this should help decrease memory fragementation. When doing this, we also pack some of the other sections a little closer together, to make sure we don't waste memory. To make this happen, we need to rename the .data.init_task section to .init_task.data, so it doesn't get picked up by the linker script glob. Since it causes the kernel not to boot up with mtd filesystems. Signed-off-by: Bernd Schmidt <bernd.schmidt@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r--arch/blackfin/kernel/setup.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index eee5a1fcb64c..d2822010b7ce 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -237,7 +237,7 @@ void __init setup_arch(char **cmdline_p)
237 /* by now the stack is part of the init task */ 237 /* by now the stack is part of the init task */
238 memory_end = _ramend - DMA_UNCACHED_REGION; 238 memory_end = _ramend - DMA_UNCACHED_REGION;
239 239
240 _ramstart = (unsigned long)_end; 240 _ramstart = (unsigned long)__bss_stop;
241 memory_start = PAGE_ALIGN(_ramstart); 241 memory_start = PAGE_ALIGN(_ramstart);
242 242
243#if defined(CONFIG_MTD_UCLINUX) 243#if defined(CONFIG_MTD_UCLINUX)
@@ -286,7 +286,7 @@ void __init setup_arch(char **cmdline_p)
286 } 286 }
287 287
288 /* Relocate MTD image to the top of memory after the uncached memory area */ 288 /* Relocate MTD image to the top of memory after the uncached memory area */
289 dma_memcpy((char *)memory_end, _end, mtd_size); 289 dma_memcpy((char *)memory_end, __bss_stop, mtd_size);
290 290
291 memory_mtd_start = memory_end; 291 memory_mtd_start = memory_end;
292 _ebss = memory_mtd_start; /* define _ebss for compatible */ 292 _ebss = memory_mtd_start; /* define _ebss for compatible */
@@ -358,10 +358,10 @@ void __init setup_arch(char **cmdline_p)
358 printk(KERN_INFO "Memory map:\n" 358 printk(KERN_INFO "Memory map:\n"
359 KERN_INFO " text = 0x%p-0x%p\n" 359 KERN_INFO " text = 0x%p-0x%p\n"
360 KERN_INFO " rodata = 0x%p-0x%p\n" 360 KERN_INFO " rodata = 0x%p-0x%p\n"
361 KERN_INFO " bss = 0x%p-0x%p\n"
362 KERN_INFO " data = 0x%p-0x%p\n" 361 KERN_INFO " data = 0x%p-0x%p\n"
363 KERN_INFO " stack = 0x%p-0x%p\n" 362 KERN_INFO " stack = 0x%p-0x%p\n"
364 KERN_INFO " init = 0x%p-0x%p\n" 363 KERN_INFO " init = 0x%p-0x%p\n"
364 KERN_INFO " bss = 0x%p-0x%p\n"
365 KERN_INFO " available = 0x%p-0x%p\n" 365 KERN_INFO " available = 0x%p-0x%p\n"
366#ifdef CONFIG_MTD_UCLINUX 366#ifdef CONFIG_MTD_UCLINUX
367 KERN_INFO " rootfs = 0x%p-0x%p\n" 367 KERN_INFO " rootfs = 0x%p-0x%p\n"
@@ -371,10 +371,10 @@ void __init setup_arch(char **cmdline_p)
371#endif 371#endif
372 , _stext, _etext, 372 , _stext, _etext,
373 __start_rodata, __end_rodata, 373 __start_rodata, __end_rodata,
374 __bss_start, __bss_stop,
375 _sdata, _edata, 374 _sdata, _edata,
376 (void *)&init_thread_union, (void *)((int)(&init_thread_union) + 0x2000), 375 (void *)&init_thread_union, (void *)((int)(&init_thread_union) + 0x2000),
377 __init_begin, __init_end, 376 __init_begin, __init_end,
377 __bss_start, __bss_stop,
378 (void *)_ramstart, (void *)memory_end 378 (void *)_ramstart, (void *)memory_end
379#ifdef CONFIG_MTD_UCLINUX 379#ifdef CONFIG_MTD_UCLINUX
380 , (void *)memory_mtd_start, (void *)(memory_mtd_start + mtd_size) 380 , (void *)memory_mtd_start, (void *)(memory_mtd_start + mtd_size)