mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 16:16:15 -04:00
parisc: Optimize switch_mm
We only need to switch contexts when prev != next, and we don't need to disable interrupts to do the check. Signed-off-by: John David Anglin <dave.anglin@bell.net> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
42593e7000
commit
d2883fa1a6
1 changed files with 3 additions and 0 deletions
|
|
@ -63,6 +63,9 @@ static inline void switch_mm(struct mm_struct *prev,
|
|||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (prev == next)
|
||||
return;
|
||||
|
||||
local_irq_save(flags);
|
||||
switch_mm_irqs_off(prev, next, tsk);
|
||||
local_irq_restore(flags);
|
||||
|
|
|
|||
Loading…
Reference in a new issue