mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] x86-64: Directly access per-cpu IST
@ 2010-07-31 16:48 Brian Gerst
  2010-07-31 16:48 ` [PATCH 2/2] x86-32: Directly access per-cpu GDT Brian Gerst
  2010-08-02 15:15 ` [tip:x86/asm] x86-64, asm: Directly access per-cpu IST tip-bot for Brian Gerst
  0 siblings, 2 replies; 4+ messages in thread
From: Brian Gerst @ 2010-07-31 16:48 UTC (permalink / raw)
  To: hpa; +Cc: x86, linux-kernel

Use a direct per-cpu reference for the IST instead of using a scratch
register.

Signed-off-by: Brian Gerst <brgerst@gmail.com>
---
 arch/x86/kernel/entry_64.S |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index 4db7c4d..59af275 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -1065,6 +1065,7 @@ ENTRY(\sym)
 END(\sym)
 .endm
 
+#define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8)
 .macro paranoidzeroentry_ist sym do_sym ist
 ENTRY(\sym)
 	INTR_FRAME
@@ -1076,10 +1077,9 @@ ENTRY(\sym)
 	TRACE_IRQS_OFF
 	movq %rsp,%rdi		/* pt_regs pointer */
 	xorl %esi,%esi		/* no error code */
-	PER_CPU(init_tss, %r12)
-	subq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%r12)
+	subq $EXCEPTION_STKSZ, INIT_TSS_IST(\ist)
 	call \do_sym
-	addq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%r12)
+	addq $EXCEPTION_STKSZ, INIT_TSS_IST(\ist)
 	jmp paranoid_exit	/* %ebx: no swapgs flag */
 	CFI_ENDPROC
 END(\sym)
-- 
1.7.2


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-08-02 15:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-31 16:48 [PATCH 1/2] x86-64: Directly access per-cpu IST Brian Gerst
2010-07-31 16:48 ` [PATCH 2/2] x86-32: Directly access per-cpu GDT Brian Gerst
2010-08-02 15:16   ` [tip:x86/asm] x86-32, asm: " tip-bot for Brian Gerst
2010-08-02 15:15 ` [tip:x86/asm] x86-64, asm: Directly access per-cpu IST tip-bot for Brian Gerst

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome