aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/c6x/kernel/setup.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/arch/c6x/kernel/setup.c b/arch/c6x/kernel/setup.c
index 2e1c0ea22eb0..e9d6824ae94d 100644
--- a/arch/c6x/kernel/setup.c
+++ b/arch/c6x/kernel/setup.c
@@ -290,7 +290,6 @@ notrace void __init machine_init(unsigned long dt_ptr)
290 290
291void __init setup_arch(char **cmdline_p) 291void __init setup_arch(char **cmdline_p)
292{ 292{
293 int bootmap_size;
294 struct memblock_region *reg; 293 struct memblock_region *reg;
295 294
296 printk(KERN_INFO "Initializing kernel\n"); 295 printk(KERN_INFO "Initializing kernel\n");
@@ -347,16 +346,6 @@ void __init setup_arch(char **cmdline_p)
347 init_mm.end_data = memory_start; 346 init_mm.end_data = memory_start;
348 init_mm.brk = memory_start; 347 init_mm.brk = memory_start;
349 348
350 /*
351 * Give all the memory to the bootmap allocator, tell it to put the
352 * boot mem_map at the start of memory
353 */
354 bootmap_size = init_bootmem_node(NODE_DATA(0),
355 memory_start >> PAGE_SHIFT,
356 PAGE_OFFSET >> PAGE_SHIFT,
357 memory_end >> PAGE_SHIFT);
358 memblock_reserve(memory_start, bootmap_size);
359
360 unflatten_and_copy_device_tree(); 349 unflatten_and_copy_device_tree();
361 350
362 c6x_cache_init(); 351 c6x_cache_init();
@@ -391,22 +380,9 @@ void __init setup_arch(char **cmdline_p)
391 /* Initialize the coherent memory allocator */ 380 /* Initialize the coherent memory allocator */
392 coherent_mem_init(dma_start, dma_size); 381 coherent_mem_init(dma_start, dma_size);
393 382
394 /*
395 * Free all memory as a starting point.
396 */
397 free_bootmem(PAGE_OFFSET, memory_end - PAGE_OFFSET);
398
399 /*
400 * Then reserve memory which is already being used.
401 */
402 for_each_memblock(reserved, reg) {
403 pr_debug("reserved - 0x%08x-0x%08x\n",
404 (u32) reg->base, (u32) reg->size);
405 reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT);
406 }
407
408 max_low_pfn = PFN_DOWN(memory_end); 383 max_low_pfn = PFN_DOWN(memory_end);
409 min_low_pfn = PFN_UP(memory_start); 384 min_low_pfn = PFN_UP(memory_start);
385 max_pfn = max_low_pfn;
410 max_mapnr = max_low_pfn - min_low_pfn; 386 max_mapnr = max_low_pfn - min_low_pfn;
411 387
412 /* Get kmalloc into gear */ 388 /* Get kmalloc into gear */