x86-64, asm: Directly access per-cpu IST
Use a direct per-cpu reference for the IST instead of using a scratch register. Signed-off-by: Brian Gerst <brgerst@gmail.com> LKML-Reference: <1280594903-6341-1-git-send-email-brgerst@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
a378d9338e
commit
c15a5958a0
|
@ -1065,6 +1065,7 @@ ENTRY(\sym)
|
||||||
END(\sym)
|
END(\sym)
|
||||||
.endm
|
.endm
|
||||||
|
|
||||||
|
#define INIT_TSS_IST(x) PER_CPU_VAR(init_tss) + (TSS_ist + ((x) - 1) * 8)
|
||||||
.macro paranoidzeroentry_ist sym do_sym ist
|
.macro paranoidzeroentry_ist sym do_sym ist
|
||||||
ENTRY(\sym)
|
ENTRY(\sym)
|
||||||
INTR_FRAME
|
INTR_FRAME
|
||||||
|
@ -1076,10 +1077,9 @@ ENTRY(\sym)
|
||||||
TRACE_IRQS_OFF
|
TRACE_IRQS_OFF
|
||||||
movq %rsp,%rdi /* pt_regs pointer */
|
movq %rsp,%rdi /* pt_regs pointer */
|
||||||
xorl %esi,%esi /* no error code */
|
xorl %esi,%esi /* no error code */
|
||||||
PER_CPU(init_tss, %r12)
|
subq $EXCEPTION_STKSZ, INIT_TSS_IST(\ist)
|
||||||
subq $EXCEPTION_STKSZ, TSS_ist + (\ist - 1) * 8(%r12)
|
|
||||||
call \do_sym
|
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 */
|
jmp paranoid_exit /* %ebx: no swapgs flag */
|
||||||
CFI_ENDPROC
|
CFI_ENDPROC
|
||||||
END(\sym)
|
END(\sym)
|
||||||
|
|
Loading…
Reference in New Issue