mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-25 07:14:36 +08:00
powerpc/64e: Get esr offset with _ESR macro
Use _ESR to get the offset of esr register in pr_regs for 64e cpus. Signed-off-by: Xiongwei Song <sxwjean@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20210807010239.416055-3-sxwjean@me.com
This commit is contained in:
parent
4f8e78c075
commit
cfa47772ca
@ -287,6 +287,7 @@ int main(void)
|
|||||||
STACK_PT_REGS_OFFSET(_XER, xer);
|
STACK_PT_REGS_OFFSET(_XER, xer);
|
||||||
STACK_PT_REGS_OFFSET(_DAR, dar);
|
STACK_PT_REGS_OFFSET(_DAR, dar);
|
||||||
STACK_PT_REGS_OFFSET(_DSISR, dsisr);
|
STACK_PT_REGS_OFFSET(_DSISR, dsisr);
|
||||||
|
STACK_PT_REGS_OFFSET(_ESR, esr);
|
||||||
STACK_PT_REGS_OFFSET(ORIG_GPR3, orig_gpr3);
|
STACK_PT_REGS_OFFSET(ORIG_GPR3, orig_gpr3);
|
||||||
STACK_PT_REGS_OFFSET(RESULT, result);
|
STACK_PT_REGS_OFFSET(RESULT, result);
|
||||||
STACK_PT_REGS_OFFSET(_TRAP, trap);
|
STACK_PT_REGS_OFFSET(_TRAP, trap);
|
||||||
@ -298,7 +299,6 @@ int main(void)
|
|||||||
* we use them to hold SRR0 and SRR1.
|
* we use them to hold SRR0 and SRR1.
|
||||||
*/
|
*/
|
||||||
STACK_PT_REGS_OFFSET(_DEAR, dar);
|
STACK_PT_REGS_OFFSET(_DEAR, dar);
|
||||||
STACK_PT_REGS_OFFSET(_ESR, dsisr);
|
|
||||||
#else /* CONFIG_PPC64 */
|
#else /* CONFIG_PPC64 */
|
||||||
STACK_PT_REGS_OFFSET(SOFTE, softe);
|
STACK_PT_REGS_OFFSET(SOFTE, softe);
|
||||||
STACK_PT_REGS_OFFSET(_PPR, ppr);
|
STACK_PT_REGS_OFFSET(_PPR, ppr);
|
||||||
|
@ -546,7 +546,7 @@ __end_interrupts:
|
|||||||
mfspr r14,SPRN_DEAR
|
mfspr r14,SPRN_DEAR
|
||||||
mfspr r15,SPRN_ESR
|
mfspr r15,SPRN_ESR
|
||||||
std r14,_DAR(r1)
|
std r14,_DAR(r1)
|
||||||
std r15,_DSISR(r1)
|
std r15,_ESR(r1)
|
||||||
ld r14,PACA_EXGEN+EX_R14(r13)
|
ld r14,PACA_EXGEN+EX_R14(r13)
|
||||||
ld r15,PACA_EXGEN+EX_R15(r13)
|
ld r15,PACA_EXGEN+EX_R15(r13)
|
||||||
EXCEPTION_COMMON(0x300)
|
EXCEPTION_COMMON(0x300)
|
||||||
@ -559,7 +559,7 @@ __end_interrupts:
|
|||||||
li r15,0
|
li r15,0
|
||||||
mr r14,r10
|
mr r14,r10
|
||||||
std r14,_DAR(r1)
|
std r14,_DAR(r1)
|
||||||
std r15,_DSISR(r1)
|
std r15,_ESR(r1)
|
||||||
ld r14,PACA_EXGEN+EX_R14(r13)
|
ld r14,PACA_EXGEN+EX_R14(r13)
|
||||||
ld r15,PACA_EXGEN+EX_R15(r13)
|
ld r15,PACA_EXGEN+EX_R15(r13)
|
||||||
EXCEPTION_COMMON(0x400)
|
EXCEPTION_COMMON(0x400)
|
||||||
@ -576,7 +576,7 @@ __end_interrupts:
|
|||||||
mfspr r14,SPRN_DEAR
|
mfspr r14,SPRN_DEAR
|
||||||
mfspr r15,SPRN_ESR
|
mfspr r15,SPRN_ESR
|
||||||
std r14,_DAR(r1)
|
std r14,_DAR(r1)
|
||||||
std r15,_DSISR(r1)
|
std r15,_ESR(r1)
|
||||||
ld r14,PACA_EXGEN+EX_R14(r13)
|
ld r14,PACA_EXGEN+EX_R14(r13)
|
||||||
ld r15,PACA_EXGEN+EX_R15(r13)
|
ld r15,PACA_EXGEN+EX_R15(r13)
|
||||||
EXCEPTION_COMMON(0x600)
|
EXCEPTION_COMMON(0x600)
|
||||||
@ -587,7 +587,7 @@ __end_interrupts:
|
|||||||
NORMAL_EXCEPTION_PROLOG(0x700, BOOKE_INTERRUPT_PROGRAM,
|
NORMAL_EXCEPTION_PROLOG(0x700, BOOKE_INTERRUPT_PROGRAM,
|
||||||
PROLOG_ADDITION_1REG)
|
PROLOG_ADDITION_1REG)
|
||||||
mfspr r14,SPRN_ESR
|
mfspr r14,SPRN_ESR
|
||||||
std r14,_DSISR(r1)
|
std r14,_ESR(r1)
|
||||||
ld r14,PACA_EXGEN+EX_R14(r13)
|
ld r14,PACA_EXGEN+EX_R14(r13)
|
||||||
EXCEPTION_COMMON(0x700)
|
EXCEPTION_COMMON(0x700)
|
||||||
addi r3,r1,STACK_FRAME_OVERHEAD
|
addi r3,r1,STACK_FRAME_OVERHEAD
|
||||||
@ -1058,7 +1058,7 @@ bad_stack_book3e:
|
|||||||
mfspr r10,SPRN_DEAR
|
mfspr r10,SPRN_DEAR
|
||||||
mfspr r11,SPRN_ESR
|
mfspr r11,SPRN_ESR
|
||||||
std r10,_DAR(r1)
|
std r10,_DAR(r1)
|
||||||
std r11,_DSISR(r1)
|
std r11,_ESR(r1)
|
||||||
std r0,GPR0(r1); /* save r0 in stackframe */ \
|
std r0,GPR0(r1); /* save r0 in stackframe */ \
|
||||||
std r2,GPR2(r1); /* save r2 in stackframe */ \
|
std r2,GPR2(r1); /* save r2 in stackframe */ \
|
||||||
SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \
|
SAVE_4GPRS(3, r1); /* save r3 - r6 in stackframe */ \
|
||||||
|
Loading…
Reference in New Issue
Block a user