Merge tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Oct 2018 22:39:25 +0000 (15:39 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 31 Oct 2018 22:39:25 +0000 (15:39 -0700)
Pull c6x update from Mark Salter.

* tag 'for-linus' of git://linux-c6x.org/git/projects/linux-c6x-upstreaming:
  c6x: switch to NO_BOOTMEM

1  2 
arch/c6x/kernel/setup.c

diff --combined arch/c6x/kernel/setup.c
index 2e1c0ea22eb07663dfe14ef210bd92d1c9c5f810,2cfca640acfee37c5b1f1ec3a3b8607197e137ae..e9d6824ae94d51201a9aea3c4200318a206bff2d
@@@ -11,6 -11,7 +11,6 @@@
  #include <linux/dma-mapping.h>
  #include <linux/memblock.h>
  #include <linux/seq_file.h>
 -#include <linux/bootmem.h>
  #include <linux/clkdev.h>
  #include <linux/initrd.h>
  #include <linux/kernel.h>
@@@ -290,7 -291,6 +290,6 @@@ notrace void __init machine_init(unsign
  
  void __init setup_arch(char **cmdline_p)
  {
-       int bootmap_size;
        struct memblock_region *reg;
  
        printk(KERN_INFO "Initializing kernel\n");
        init_mm.end_data   = 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();
  
        c6x_cache_init();
        /* Initialize the coherent memory allocator */
        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);
        min_low_pfn = PFN_UP(memory_start);
+       max_pfn = max_low_pfn;
        max_mapnr = max_low_pfn - min_low_pfn;
  
        /* Get kmalloc into gear */