Commit d479a137 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: Potentially avoid an atomic operation in switch_mm.

From: Anton Blanchard <anton@samba.org>

This appeared in the ia64 port and sounds like a good idea. Potentially
avoid an atomic operation in switch_mm.
parent d3059cbc
......@@ -156,6 +156,9 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
: : );
#endif /* CONFIG_ALTIVEC */
if (!cpu_isset(smp_processor_id(), next->cpu_vm_mask))
cpu_set(smp_processor_id(), next->cpu_vm_mask);
/* No need to flush userspace segments if the mm doesnt change */
if (prev == next)
return;
......@@ -164,7 +167,6 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
flush_slb(tsk, next);
else
flush_stab(tsk, next);
cpu_set(smp_processor_id(), next->cpu_vm_mask);
}
#define deactivate_mm(tsk,mm) do { } while (0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment