[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200308231718.634477991@linutronix.de>
Date: Mon, 09 Mar 2020 00:14:12 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: LKML <linux-kernel@...r.kernel.org>
Cc: x86@...nel.org, Steven Rostedt <rostedt@...dmis.org>,
Brian Gerst <brgerst@...il.com>,
Juergen Gross <jgross@...e.com>,
Frederic Weisbecker <frederic@...nel.org>,
Alexandre Chartre <alexandre.chartre@...cle.com>,
Andy Lutomirski <luto@...nel.org>
Subject: [patch part-III V2 02/23] x86/entry/64: Avoid pointless code when CONTEXT_TRACKING=n
From: Thomas Gleixner <tglx@...utronix.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 <tglx@...utronix.de>
Reviewed-by: Alexandre Chartre <alexandre.chartre@...cle.com>
Acked-by: Frederic Weisbecker <frederic@...nel.org>
Acked-by: Andy Lutomirski <luto@...nel.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
@@ -884,12 +884,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 */
Powered by blists - more mailing lists