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