diff options
author | Thomas Gleixner <[email protected]> | 2020-02-25 23:16:08 +0100 |
---|---|---|
committer | Thomas Gleixner <[email protected]> | 2020-06-11 15:14:34 +0200 |
commit | 725005897ec4ba07d6227a1ac3121048153eb3ce (patch) | |
tree | e978e712ea5ffba49363bbddbb0b3db7849d11c7 | |
parent | e9660391d0ebd174b169af3d6de680c2f836027c (diff) |
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: Thomas Gleixner <[email protected]>
Reviewed-by: Alexandre Chartre <[email protected]>
Acked-by: Frederic Weisbecker <[email protected]>
Acked-by: Andy Lutomirski <[email protected]>
Acked-by: Peter Zijlstra <[email protected]>
Link: https://lkml.kernel.org/r/[email protected]
-rw-r--r-- | arch/x86/entry/entry_64.S | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/entry/entry_64.S b/arch/x86/entry/entry_64.S index 87ffa792bc99..a15b70ac87b5 100644 --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -889,12 +889,14 @@ apicinterrupt IRQ_WORK_VECTOR irq_work_interrupt smp_irq_work_interrupt 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 */ |