linux-next: manual merge of the percpu tree with the tip tree
From: Stephen Rothwell
Date: Wed May 16 2012 - 03:36:24 EST
Hi all,
Today's linux-next merge of the percpu tree got a conflict in
arch/x86/mm/tlb.c between commit a6fca40f1d7f ("x86, tlb: Switch cr3 in
leave_mm() only when needed") from the tip tree and commit c6ae41e7d469
("x86: replace percpu_xxx funcs with this_cpu_xxx") from the percpu tree.
I fixed it up (see below) and can carry the fix as necessary.
--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx
diff --cc arch/x86/mm/tlb.c
index 125bcad,3804471..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);
Attachment:
pgp00000.pgp
Description: PGP signature