Commit a586f98e authored by Andy Lutomirski's avatar Andy Lutomirski Committed by Ingo Molnar

x86/asm/entry/64: Simplify IRQ stack pt_regs handling

There's no need for both RSI and RDI to point to the original stack.
Signed-off-by: default avatarAndy Lutomirski <luto@kernel.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: Denys Vlasenko <vda.linux@googlemail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: paulmck@linux.vnet.ibm.com
Link: http://lkml.kernel.org/r/3a0481f809dd340c7d3f54ce3fd6d66ef2a578cd.1435952415.git.luto@kernel.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent ff467594
...@@ -506,8 +506,6 @@ END(irq_entries_start) ...@@ -506,8 +506,6 @@ END(irq_entries_start)
SAVE_C_REGS SAVE_C_REGS
SAVE_EXTRA_REGS SAVE_EXTRA_REGS
movq %rsp,%rdi /* arg1 for \func (pointer to pt_regs) */
testb $3, CS(%rsp) testb $3, CS(%rsp)
jz 1f jz 1f
SWAPGS SWAPGS
...@@ -519,14 +517,14 @@ END(irq_entries_start) ...@@ -519,14 +517,14 @@ END(irq_entries_start)
* a little cheaper to use a separate counter in the PDA (short of * a little cheaper to use a separate counter in the PDA (short of
* moving irq_enter into assembly, which would be too much work) * moving irq_enter into assembly, which would be too much work)
*/ */
movq %rsp, %rsi movq %rsp, %rdi
incl PER_CPU_VAR(irq_count) incl PER_CPU_VAR(irq_count)
cmovzq PER_CPU_VAR(irq_stack_ptr), %rsp cmovzq PER_CPU_VAR(irq_stack_ptr), %rsp
pushq %rsi pushq %rdi
/* We entered an interrupt context - irqs are off: */ /* We entered an interrupt context - irqs are off: */
TRACE_IRQS_OFF TRACE_IRQS_OFF
call \func call \func /* rdi points to pt_regs */
.endm .endm
/* /*
......
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