Merge branch 'akpm' (more incoming from Andrew)
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Feb 2013 01:50:35 +0000 (17:50 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 24 Feb 2013 01:50:35 +0000 (17:50 -0800)
Merge second patch-bomb from Andrew Morton:

 - A little DM fix

 - the MM queue

* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (154 commits)
  ksm: allocate roots when needed
  mm: cleanup "swapcache" in do_swap_page
  mm,ksm: swapoff might need to copy
  mm,ksm: FOLL_MIGRATION do migration_entry_wait
  ksm: shrink 32-bit rmap_item back to 32 bytes
  ksm: treat unstable nid like in stable tree
  ksm: add some comments
  tmpfs: fix mempolicy object leaks
  tmpfs: fix use-after-free of mempolicy object
  mm/fadvise.c: drain all pagevecs if POSIX_FADV_DONTNEED fails to discard all pages
  mm: export mmu notifier invalidates
  mm: accelerate mm_populate() treatment of THP pages
  mm: use long type for page counts in mm_populate() and get_user_pages()
  mm: accurately document nr_free_*_pages functions with code comments
  HWPOISON: change order of error_states[]'s elements
  HWPOISON: fix misjudgement of page_action() for errors on mlocked pages
  memcg: stop warning on memcg_propagate_kmem
  net: change type of virtio_chan->p9_max_pages
  vmscan: change type of vm_total_pages to unsigned long
  fs/nfsd: change type of max_delegations, nfsd_drc_max_mem and nfsd_drc_mem_used
  ...

1  2 
arch/powerpc/mm/mem.c

diff --combined arch/powerpc/mm/mem.c
index 40df7c8f20967a4c9d54545b55a19edc430bbac5,09c64518b4d0b55d9eabc3df40fc197a7202949c..f1f7409a418387dcd73d3791eab891ca4ea8e80d
@@@ -133,6 -133,18 +133,18 @@@ int arch_add_memory(int nid, u64 start
  
        return __add_pages(nid, zone, start_pfn, nr_pages);
  }
+ #ifdef CONFIG_MEMORY_HOTREMOVE
+ int arch_remove_memory(u64 start, u64 size)
+ {
+       unsigned long start_pfn = start >> PAGE_SHIFT;
+       unsigned long nr_pages = size >> PAGE_SHIFT;
+       struct zone *zone;
+       zone = page_zone(pfn_to_page(start_pfn));
+       return __remove_pages(zone, start_pfn, nr_pages);
+ }
+ #endif
  #endif /* CONFIG_MEMORY_HOTPLUG */
  
  /*
@@@ -195,10 -207,13 +207,10 @@@ void __init do_init_bootmem(void
        min_low_pfn = MEMORY_START >> PAGE_SHIFT;
        boot_mapsize = init_bootmem_node(NODE_DATA(0), start >> PAGE_SHIFT, min_low_pfn, max_low_pfn);
  
 -      /* Add active regions with valid PFNs */
 -      for_each_memblock(memory, reg) {
 -              unsigned long start_pfn, end_pfn;
 -              start_pfn = memblock_region_memory_base_pfn(reg);
 -              end_pfn = memblock_region_memory_end_pfn(reg);
 -              memblock_set_node(0, (phys_addr_t)ULLONG_MAX, 0);
 -      }
 +      /* Place all memblock_regions in the same node and merge contiguous
 +       * memblock_regions
 +       */
 +      memblock_set_node(0, (phys_addr_t)ULLONG_MAX, 0);
  
        /* Add all physical memory to the bootmem map, mark each area
         * present.