aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/setup.c
diff options
context:
space:
mode:
authorRobin Getz <robin.getz@analog.com>2007-11-15 07:57:53 -0500
committerBryan Wu <bryan.wu@analog.com>2007-11-15 07:57:53 -0500
commit839e01c2bfba34f97ec36d0d355801e94254ffd5 (patch)
tree286efca13b5b9e4dc195460f34409d703b7725c3 /arch/blackfin/kernel/setup.c
parent74ce8322bf8843e6fd04e081d361c107bcf73564 (diff)
Blackfin arch: move the init sections to the end of memory to help decrease memory fragementation
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. Signed-off-by: Robin Getz <robin.getz@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 934234f43839..dfe06b09a9d4 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -236,7 +236,7 @@ void __init setup_arch(char **cmdline_p)
236 /* by now the stack is part of the init task */ 236 /* by now the stack is part of the init task */
237 memory_end = _ramend - DMA_UNCACHED_REGION; 237 memory_end = _ramend - DMA_UNCACHED_REGION;
238 238
239 _ramstart = (unsigned long)__bss_stop; 239 _ramstart = (unsigned long)_end;
240 memory_start = PAGE_ALIGN(_ramstart); 240 memory_start = PAGE_ALIGN(_ramstart);
241 241
242#if defined(CONFIG_MTD_UCLINUX) 242#if defined(CONFIG_MTD_UCLINUX)
@@ -285,7 +285,7 @@ void __init setup_arch(char **cmdline_p)
285 } 285 }
286 286
287 /* Relocate MTD image to the top of memory after the uncached memory area */ 287 /* Relocate MTD image to the top of memory after the uncached memory area */
288 dma_memcpy((char *)memory_end, __bss_stop, mtd_size); 288 dma_memcpy((char *)memory_end, _end, mtd_size);
289 289
290 memory_mtd_start = memory_end; 290 memory_mtd_start = memory_end;
291 _ebss = memory_mtd_start; /* define _ebss for compatible */ 291 _ebss = memory_mtd_start; /* define _ebss for compatible */
@@ -357,10 +357,10 @@ void __init setup_arch(char **cmdline_p)
357 printk(KERN_INFO "Memory map:\n" 357 printk(KERN_INFO "Memory map:\n"
358 KERN_INFO " text = 0x%p-0x%p\n" 358 KERN_INFO " text = 0x%p-0x%p\n"
359 KERN_INFO " rodata = 0x%p-0x%p\n" 359 KERN_INFO " rodata = 0x%p-0x%p\n"
360 KERN_INFO " bss = 0x%p-0x%p\n"
360 KERN_INFO " data = 0x%p-0x%p\n" 361 KERN_INFO " data = 0x%p-0x%p\n"
361 KERN_INFO " stack = 0x%p-0x%p\n" 362 KERN_INFO " stack = 0x%p-0x%p\n"
362 KERN_INFO " init = 0x%p-0x%p\n" 363 KERN_INFO " init = 0x%p-0x%p\n"
363 KERN_INFO " bss = 0x%p-0x%p\n"
364 KERN_INFO " available = 0x%p-0x%p\n" 364 KERN_INFO " available = 0x%p-0x%p\n"
365#ifdef CONFIG_MTD_UCLINUX 365#ifdef CONFIG_MTD_UCLINUX
366 KERN_INFO " rootfs = 0x%p-0x%p\n" 366 KERN_INFO " rootfs = 0x%p-0x%p\n"
@@ -370,10 +370,10 @@ void __init setup_arch(char **cmdline_p)
370#endif 370#endif
371 , _stext, _etext, 371 , _stext, _etext,
372 __start_rodata, __end_rodata, 372 __start_rodata, __end_rodata,
373 __bss_start, __bss_stop,
373 _sdata, _edata, 374 _sdata, _edata,
374 (void *)&init_thread_union, (void *)((int)(&init_thread_union) + 0x2000), 375 (void *)&init_thread_union, (void *)((int)(&init_thread_union) + 0x2000),
375 __init_begin, __init_end, 376 __init_begin, __init_end,
376 __bss_start, __bss_stop,
377 (void *)_ramstart, (void *)memory_end 377 (void *)_ramstart, (void *)memory_end
378#ifdef CONFIG_MTD_UCLINUX 378#ifdef CONFIG_MTD_UCLINUX
379 , (void *)memory_mtd_start, (void *)(memory_mtd_start + mtd_size) 379 , (void *)memory_mtd_start, (void *)(memory_mtd_start + mtd_size)