Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 May 2012 18:06:59 +0000 (11:06 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 May 2012 18:06:59 +0000 (11:06 -0700)
Pull x86 mm changes from Ingo Molnar:
 "This tree includes a micro-optimization that avoids cr3 switches
  during idling; it fixes corner cases and there's also small cleanups"

Fix up trivial context conflict with the percpu_xx -> this_cpu_xx
changes.

* 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86-64: Fix accounting in kernel_physical_mapping_init()
  x86/tlb: Clean up and unify TLB_FLUSH_ALL definition
  x86: Drop obsolete ARCH_BOOTMEM support
  x86, tlb: Switch cr3 in leave_mm() only when needed
  x86/mm: Fix the size calculation of mapping tables

1  2 
arch/x86/Kconfig
arch/x86/include/asm/tlbflush.h
arch/x86/mm/init.c
arch/x86/mm/init_64.c
arch/x86/mm/tlb.c

Simple merge
Simple merge
Simple merge
Simple merge
index 3804471db1046ec17ea76be9ba04417fa650142c,125bcad1b757e37ac5682d6c4eec1a0184289fc8..5e57e113b72c1388bc89599a88a79cd237a67330
@@@ -61,11 -61,13 +61,13 @@@ static DEFINE_PER_CPU_READ_MOSTLY(int, 
   */
  void leave_mm(int cpu)
  {
 -      struct mm_struct *active_mm = percpu_read(cpu_tlbstate.active_mm);
 -      if (percpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
++      struct mm_struct *active_mm = this_cpu_read(cpu_tlbstate.active_mm);
 +      if (this_cpu_read(cpu_tlbstate.state) == TLBSTATE_OK)
                BUG();
-       cpumask_clear_cpu(cpu,
-                         mm_cpumask(this_cpu_read(cpu_tlbstate.active_mm)));
-       load_cr3(swapper_pg_dir);
+       if (cpumask_test_cpu(cpu, mm_cpumask(active_mm))) {
+               cpumask_clear_cpu(cpu, mm_cpumask(active_mm));
+               load_cr3(swapper_pg_dir);
+       }
  }
  EXPORT_SYMBOL_GPL(leave_mm);