Commit 2a72d2e5 authored by Russell King's avatar Russell King

[ARM] Put back the CPU MM context switch avoidence test.

On context switch, when the MM hasn't changed, we can avoid calling
the architecture specific area.
parent e39a6ad8
...@@ -34,13 +34,17 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu) ...@@ -34,13 +34,17 @@ enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk, unsigned cpu)
/* /*
* This is the actual mm switch as far as the scheduler * This is the actual mm switch as far as the scheduler
* is concerned. No registers are touched. * is concerned. No registers are touched. We avoid
* calling the CPU specific function when the mm hasn't
* actually changed.
*/ */
static inline void static inline void
switch_mm(struct mm_struct *prev, struct mm_struct *next, switch_mm(struct mm_struct *prev, struct mm_struct *next,
struct task_struct *tsk, unsigned int cpu) struct task_struct *tsk, unsigned int cpu)
{ {
cpu_switch_mm(next->pgd, next); if (prev != next) {
cpu_switch_mm(next->pgd, next);
}
} }
static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next) static inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)
......
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