summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@bell.net>2017-07-26 20:02:52 +0200
committerHelge Deller <deller@gmx.de>2017-08-22 16:34:34 +0200
commitd2883fa1a6fcb065362f27f410114dc6b7084655 (patch)
tree3e3dbbd561e3e6c83ae44db747f84ae74e0435a4
parent42593e70004d13baf9f1587aed13911cac01cfd9 (diff)
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>
-rw-r--r--arch/parisc/include/asm/mmu_context.h3
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);