x86/process: Optimize TIF_NOTSC switch
authorThomas Gleixner <tglx@linutronix.de>
Tue, 14 Feb 2017 08:11:04 +0000 (00:11 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 11 Mar 2017 11:45:18 +0000 (12:45 +0100)
commit5a920155e388ec22a22e0532fb695b9215c9b34d
treee92bef00945f4180419a0ea81bc667bb3f542054
parentb9894a2f5bd18b1691cb6872c9afe32b148d0132
x86/process: Optimize TIF_NOTSC switch

Provide and use a toggle helper instead of doing it with a branch.

x86_64: arch/x86/kernel/process.o
text    data     bss     dec     hex
3008    8577      16   11601    2d51 Before
2976       8577      16   11569    2d31 After

i386: arch/x86/kernel/process.o
text    data     bss     dec     hex
2925    8673       8   11606    2d56 Before
2893    8673       8   11574    2d36 After

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andy Lutomirski <luto@kernel.org>
Link: http://lkml.kernel.org/r/20170214081104.9244-4-khuey@kylehuey.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/include/asm/tlbflush.h
arch/x86/kernel/process.c