projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
42593e7
)
parisc: Optimize switch_mm
author
John David Anglin
<dave.anglin@bell.net>
Wed, 26 Jul 2017 18:02:52 +0000
(20:02 +0200)
committer
Helge Deller
<deller@gmx.de>
Tue, 22 Aug 2017 14:34:34 +0000
(16:34 +0200)
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>
arch/parisc/include/asm/mmu_context.h
patch
|
blob
|
history
diff --git
a/arch/parisc/include/asm/mmu_context.h
b/arch/parisc/include/asm/mmu_context.h
index a8122625787846b8ee4233217911b23e7b89e2f6..e4a6570940585fa3a38a24cfaff5d253e4b46de0 100644
(file)
--- 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);