Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4d8106f0 authored by Mike Rapoport's avatar Mike Rapoport Committed by Mark Salter
Browse files

c6x: switch to NO_BOOTMEM



The c6x is already using memblock and does most of early memory
reservations with it, so it was only a matter of removing the bootmem
initialization and handover of the memory from memblock to bootmem.

Signed-off-by: default avatarMike Rapoport <rppt@linux.vnet.ibm.com>
Signed-off-by: default avatarMark Salter <msalter@redhat.com>
parent b59dfdae
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -14,6 +14,7 @@ config C6X
	select GENERIC_IRQ_SHOW
	select GENERIC_IRQ_SHOW
	select HAVE_ARCH_TRACEHOOK
	select HAVE_ARCH_TRACEHOOK
	select HAVE_MEMBLOCK
	select HAVE_MEMBLOCK
	select NO_BOOTMEM
	select SPARSE_IRQ
	select SPARSE_IRQ
	select IRQ_DOMAIN
	select IRQ_DOMAIN
	select OF
	select OF
+1 −25
Original line number Original line Diff line number Diff line
@@ -291,7 +291,6 @@ notrace void __init machine_init(unsigned long dt_ptr)


void __init setup_arch(char **cmdline_p)
void __init setup_arch(char **cmdline_p)
{
{
	int bootmap_size;
	struct memblock_region *reg;
	struct memblock_region *reg;


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


	/*
	 * Give all the memory to the bootmap allocator,  tell it to put the
	 * boot mem_map at the start of memory
	 */
	bootmap_size = init_bootmem_node(NODE_DATA(0),
					 memory_start >> PAGE_SHIFT,
					 PAGE_OFFSET >> PAGE_SHIFT,
					 memory_end >> PAGE_SHIFT);
	memblock_reserve(memory_start, bootmap_size);

	unflatten_and_copy_device_tree();
	unflatten_and_copy_device_tree();


	c6x_cache_init();
	c6x_cache_init();
@@ -392,22 +381,9 @@ void __init setup_arch(char **cmdline_p)
	/* Initialize the coherent memory allocator */
	/* Initialize the coherent memory allocator */
	coherent_mem_init(dma_start, dma_size);
	coherent_mem_init(dma_start, dma_size);


	/*
	 * Free all memory as a starting point.
	 */
	free_bootmem(PAGE_OFFSET, memory_end - PAGE_OFFSET);

	/*
	 * Then reserve memory which is already being used.
	 */
	for_each_memblock(reserved, reg) {
		pr_debug("reserved - 0x%08x-0x%08x\n",
			 (u32) reg->base, (u32) reg->size);
		reserve_bootmem(reg->base, reg->size, BOOTMEM_DEFAULT);
	}

	max_low_pfn = PFN_DOWN(memory_end);
	max_low_pfn = PFN_DOWN(memory_end);
	min_low_pfn = PFN_UP(memory_start);
	min_low_pfn = PFN_UP(memory_start);
	max_pfn = max_low_pfn;
	max_mapnr = max_low_pfn - min_low_pfn;
	max_mapnr = max_low_pfn - min_low_pfn;


	/* Get kmalloc into gear */
	/* Get kmalloc into gear */