From: Thomas Gleixner <t...@linutronix.de>

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: Thomas Gleixner <t...@linutronix.de>
Reviewed-by: Alexandre Chartre <alexandre.char...@oracle.com>
Acked-by: Frederic Weisbecker <frede...@kernel.org>
Acked-by: Andy Lutomirski <l...@kernel.org>

---
 arch/x86/entry/entry_64.S |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/x86/entry/entry_64.S
+++ b/arch/x86/entry/entry_64.S
@@ -888,12 +888,14 @@ apicinterrupt IRQ_WORK_VECTOR                     irq_work
        TRACE_IRQS_OFF
        .endif
 
+#ifdef CONFIG_CONTEXT_TRACKING
        .if \paranoid == 0
        testb   $3, CS(%rsp)
        jz      .Lfrom_kernel_no_context_tracking_\@
        CALL_enter_from_user_mode
 .Lfrom_kernel_no_context_tracking_\@:
        .endif
+#endif
 
        movq    %rsp, %rdi                      /* pt_regs pointer */
 

Reply via email to