Hi all, Today's linux-next merge of the akpm tree got a conflict in between commit a6fca40f1d7f ("x86, tlb: Switch cr3 in leave_mm() only when needed") from the tip tree and commit "x86: use this_cpu_xxx to replace percpu_xxx funcs" from the akpm tree. I fixed it up (see below) and can carry the fix as necessary. -- Cheers, Stephen Rothwell sfr@canb.auug.org.au diff --cc arch/x86/mm/tlb.c index 125bcad,e931db0..0000000 --- a/arch/x86/mm/tlb.c +++ b/arch/x86/mm/tlb.c @@@ -61,13 -61,11 +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);