Skip to content

Commit adb6b2b

Browse files
committed
Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming
Pull c6x update from Mark Salter. * tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming: c6x: switch to NO_BOOTMEM
2 parents 9b5cf82 + 4d8106f commit adb6b2b

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

arch/c6x/kernel/setup.c

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,6 @@ notrace void __init machine_init(unsigned long dt_ptr)
290290

291291
void __init setup_arch(char **cmdline_p)
292292
{
293-
int bootmap_size;
294293
struct memblock_region *reg;
295294

296295
printk(KERN_INFO "Initializing kernel\n");
@@ -347,16 +346,6 @@ void __init setup_arch(char **cmdline_p)
347346
init_mm.end_data = memory_start;
348347
init_mm.brk = memory_start;
349348

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-
360349
unflatten_and_copy_device_tree();
361350

362351
c6x_cache_init();
@@ -391,22 +380,9 @@ void __init setup_arch(char **cmdline_p)
391380
/* Initialize the coherent memory allocator */
392381
coherent_mem_init(dma_start, dma_size);
393382

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-
408383
max_low_pfn = PFN_DOWN(memory_end);
409384
min_low_pfn = PFN_UP(memory_start);
385+
max_pfn = max_low_pfn;
410386
max_mapnr = max_low_pfn - min_low_pfn;
411387

412388
/* Get kmalloc into gear */

0 commit comments

Comments
 (0)