diff options
author | John David Anglin <dave.anglin@bell.net> | 2017-07-26 21:02:52 +0300 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2017-08-22 17:34:34 +0300 |
commit | d2883fa1a6fcb065362f27f410114dc6b7084655 (patch) | |
tree | 3e3dbbd561e3e6c83ae44db747f84ae74e0435a4 /arch/parisc | |
parent | 42593e70004d13baf9f1587aed13911cac01cfd9 (diff) | |
download | linux-d2883fa1a6fcb065362f27f410114dc6b7084655.tar.xz |
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>
Diffstat (limited to 'arch/parisc')
-rw-r--r-- | arch/parisc/include/asm/mmu_context.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/parisc/include/asm/mmu_context.h b/arch/parisc/include/asm/mmu_context.h index a81226257878..e4a657094058 100644 --- a/arch/parisc/include/asm/mmu_context.h +++ b/arch/parisc/include/asm/mmu_context.h @@ -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); |