Commit 72500589 authored by Thomas Gleixner's avatar Thomas Gleixner

x86/entry/64: Avoid pointless code when CONTEXT_TRACKING=n

GAS cannot optimize out the test and conditional jump when context tracking
is disabled and CALL_enter_from_user_mode is an empty macro.

Wrap it in #ifdeffery. Will go away once all this is moved to C.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Reviewed-by: default avatarAlexandre Chartre <alexandre.chartre@oracle.com>
Acked-by: default avatarFrederic Weisbecker <frederic@kernel.org>
Acked-by: default avatarAndy Lutomirski <luto@kernel.org>
Acked-by: default avatarPeter Zijlstra <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20200505134058.955968069@linutronix.de

parent e9660391
...@@ -889,12 +889,14 @@ apicinterrupt IRQ_WORK_VECTOR irq_work_interrupt smp_irq_work_interrupt ...@@ -889,12 +889,14 @@ apicinterrupt IRQ_WORK_VECTOR irq_work_interrupt smp_irq_work_interrupt
TRACE_IRQS_OFF TRACE_IRQS_OFF
.endif .endif
#ifdef CONFIG_CONTEXT_TRACKING
.if \paranoid == 0 .if \paranoid == 0
testb $3, CS(%rsp) testb $3, CS(%rsp)
jz .Lfrom_kernel_no_context_tracking_\@ jz .Lfrom_kernel_no_context_tracking_\@
CALL_enter_from_user_mode CALL_enter_from_user_mode
.Lfrom_kernel_no_context_tracking_\@: .Lfrom_kernel_no_context_tracking_\@:
.endif .endif
#endif
movq %rsp, %rdi /* pt_regs pointer */ movq %rsp, %rdi /* pt_regs pointer */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment