Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

John David Anglin and committed by
Helge Deller
d2883fa1 42593e70

+3
+3
arch/parisc/include/asm/mmu_context.h
··· 63 63 { 64 64 unsigned long flags; 65 65 66 + if (prev == next) 67 + return; 68 + 66 69 local_irq_save(flags); 67 70 switch_mm_irqs_off(prev, next, tsk); 68 71 local_irq_restore(flags);