Commit d73e0c99 authored by Paul Mackerras's avatar Paul Mackerras

powerpc: Rename asm offset TRAP to _TRAP for 32-bit

... for consistency with 64-bit.
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 007e8f51
...@@ -209,6 +209,7 @@ int main(void) ...@@ -209,6 +209,7 @@ int main(void)
DEFINE(_DSISR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr)); DEFINE(_DSISR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
DEFINE(ORIG_GPR3, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, orig_gpr3)); DEFINE(ORIG_GPR3, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, orig_gpr3));
DEFINE(RESULT, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, result)); DEFINE(RESULT, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, result));
DEFINE(_TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
#ifndef CONFIG_PPC64 #ifndef CONFIG_PPC64
DEFINE(_MQ, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, mq)); DEFINE(_MQ, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, mq));
/* /*
...@@ -219,9 +220,7 @@ int main(void) ...@@ -219,9 +220,7 @@ int main(void)
*/ */
DEFINE(_DEAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar)); DEFINE(_DEAR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dar));
DEFINE(_ESR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr)); DEFINE(_ESR, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, dsisr));
DEFINE(TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
#else /* CONFIG_PPC64 */ #else /* CONFIG_PPC64 */
DEFINE(_TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
DEFINE(SOFTE, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, softe)); DEFINE(SOFTE, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, softe));
/* These _only_ to be used with {PROM,RTAS}_FRAME_SIZE!!! */ /* These _only_ to be used with {PROM,RTAS}_FRAME_SIZE!!! */
......
...@@ -278,7 +278,7 @@ ret_from_fork: ...@@ -278,7 +278,7 @@ ret_from_fork:
syscall_dotrace: syscall_dotrace:
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
li r0,0xc00 li r0,0xc00
stw r0,TRAP(r1) stw r0,_TRAP(r1)
addi r3,r1,STACK_FRAME_OVERHEAD addi r3,r1,STACK_FRAME_OVERHEAD
bl do_syscall_trace_enter bl do_syscall_trace_enter
lwz r0,GPR0(r1) /* Restore original registers */ lwz r0,GPR0(r1) /* Restore original registers */
...@@ -299,12 +299,12 @@ syscall_exit_work: ...@@ -299,12 +299,12 @@ syscall_exit_work:
ori r10,r10,MSR_EE ori r10,r10,MSR_EE
SYNC SYNC
MTMSRD(r10) /* re-enable interrupts */ MTMSRD(r10) /* re-enable interrupts */
lwz r4,TRAP(r1) lwz r4,_TRAP(r1)
andi. r4,r4,1 andi. r4,r4,1
beq 4f beq 4f
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
li r4,0xc00 li r4,0xc00
stw r4,TRAP(r1) stw r4,_TRAP(r1)
4: 4:
addi r3,r1,STACK_FRAME_OVERHEAD addi r3,r1,STACK_FRAME_OVERHEAD
bl do_syscall_trace_leave bl do_syscall_trace_leave
...@@ -410,49 +410,49 @@ show_syscalls_task: ...@@ -410,49 +410,49 @@ show_syscalls_task:
.globl ppc_sigsuspend .globl ppc_sigsuspend
ppc_sigsuspend: ppc_sigsuspend:
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
lwz r0,TRAP(r1) lwz r0,_TRAP(r1)
rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */ rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
stw r0,TRAP(r1) /* register set saved */ stw r0,_TRAP(r1) /* register set saved */
b sys_sigsuspend b sys_sigsuspend
.globl ppc_rt_sigsuspend .globl ppc_rt_sigsuspend
ppc_rt_sigsuspend: ppc_rt_sigsuspend:
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
lwz r0,TRAP(r1) lwz r0,_TRAP(r1)
rlwinm r0,r0,0,0,30 rlwinm r0,r0,0,0,30
stw r0,TRAP(r1) stw r0,_TRAP(r1)
b sys_rt_sigsuspend b sys_rt_sigsuspend
.globl ppc_fork .globl ppc_fork
ppc_fork: ppc_fork:
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
lwz r0,TRAP(r1) lwz r0,_TRAP(r1)
rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */ rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
stw r0,TRAP(r1) /* register set saved */ stw r0,_TRAP(r1) /* register set saved */
b sys_fork b sys_fork
.globl ppc_vfork .globl ppc_vfork
ppc_vfork: ppc_vfork:
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
lwz r0,TRAP(r1) lwz r0,_TRAP(r1)
rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */ rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
stw r0,TRAP(r1) /* register set saved */ stw r0,_TRAP(r1) /* register set saved */
b sys_vfork b sys_vfork
.globl ppc_clone .globl ppc_clone
ppc_clone: ppc_clone:
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
lwz r0,TRAP(r1) lwz r0,_TRAP(r1)
rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */ rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
stw r0,TRAP(r1) /* register set saved */ stw r0,_TRAP(r1) /* register set saved */
b sys_clone b sys_clone
.globl ppc_swapcontext .globl ppc_swapcontext
ppc_swapcontext: ppc_swapcontext:
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
lwz r0,TRAP(r1) lwz r0,_TRAP(r1)
rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */ rlwinm r0,r0,0,0,30 /* clear LSB to indicate full */
stw r0,TRAP(r1) /* register set saved */ stw r0,_TRAP(r1) /* register set saved */
b sys_swapcontext b sys_swapcontext
/* /*
...@@ -469,9 +469,9 @@ handle_page_fault: ...@@ -469,9 +469,9 @@ handle_page_fault:
cmpwi r3,0 cmpwi r3,0
beq+ ret_from_except beq+ ret_from_except
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
lwz r0,TRAP(r1) lwz r0,_TRAP(r1)
clrrwi r0,r0,1 clrrwi r0,r0,1
stw r0,TRAP(r1) stw r0,_TRAP(r1)
mr r5,r3 mr r5,r3
addi r3,r1,STACK_FRAME_OVERHEAD addi r3,r1,STACK_FRAME_OVERHEAD
lwz r4,_DAR(r1) lwz r4,_DAR(r1)
...@@ -617,7 +617,7 @@ BEGIN_FTR_SECTION ...@@ -617,7 +617,7 @@ BEGIN_FTR_SECTION
b 2b b 2b
END_FTR_SECTION_IFSET(CPU_FTR_601) END_FTR_SECTION_IFSET(CPU_FTR_601)
li r10,-1 li r10,-1
stw r10,TRAP(r11) stw r10,_TRAP(r11)
addi r3,r1,STACK_FRAME_OVERHEAD addi r3,r1,STACK_FRAME_OVERHEAD
lis r10,MSR_KERNEL@h lis r10,MSR_KERNEL@h
ori r10,r10,MSR_KERNEL@l ori r10,r10,MSR_KERNEL@l
...@@ -899,12 +899,12 @@ do_user_signal: /* r10 contains MSR_KERNEL here */ ...@@ -899,12 +899,12 @@ do_user_signal: /* r10 contains MSR_KERNEL here */
SYNC SYNC
MTMSRD(r10) /* hard-enable interrupts */ MTMSRD(r10) /* hard-enable interrupts */
/* save r13-r31 in the exception frame, if not already done */ /* save r13-r31 in the exception frame, if not already done */
lwz r3,TRAP(r1) lwz r3,_TRAP(r1)
andi. r0,r3,1 andi. r0,r3,1
beq 2f beq 2f
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
rlwinm r3,r3,0,0,30 rlwinm r3,r3,0,0,30
stw r3,TRAP(r1) stw r3,_TRAP(r1)
2: li r3,0 2: li r3,0
addi r4,r1,STACK_FRAME_OVERHEAD addi r4,r1,STACK_FRAME_OVERHEAD
bl do_signal bl do_signal
...@@ -936,12 +936,12 @@ nonrecoverable: ...@@ -936,12 +936,12 @@ nonrecoverable:
BEGIN_FTR_SECTION BEGIN_FTR_SECTION
blr blr
END_FTR_SECTION_IFSET(CPU_FTR_601) END_FTR_SECTION_IFSET(CPU_FTR_601)
lwz r3,TRAP(r1) lwz r3,_TRAP(r1)
andi. r0,r3,1 andi. r0,r3,1
beq 4f beq 4f
SAVE_NVGPRS(r1) SAVE_NVGPRS(r1)
rlwinm r3,r3,0,0,30 rlwinm r3,r3,0,0,30
stw r3,TRAP(r1) stw r3,_TRAP(r1)
4: addi r3,r1,STACK_FRAME_OVERHEAD 4: addi r3,r1,STACK_FRAME_OVERHEAD
bl nonrecoverable_exception bl nonrecoverable_exception
/* shouldn't return */ /* shouldn't return */
......
...@@ -294,7 +294,7 @@ label: \ ...@@ -294,7 +294,7 @@ label: \
#define EXC_XFER_TEMPLATE(n, hdlr, trap, copyee, tfer, ret) \ #define EXC_XFER_TEMPLATE(n, hdlr, trap, copyee, tfer, ret) \
li r10,trap; \ li r10,trap; \
stw r10,TRAP(r11); \ stw r10,_TRAP(r11); \
li r10,MSR_KERNEL; \ li r10,MSR_KERNEL; \
copyee(r10, r9); \ copyee(r10, r9); \
bl tfer; \ bl tfer; \
......
...@@ -214,7 +214,7 @@ label: ...@@ -214,7 +214,7 @@ label:
#define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \ #define EXC_XFER_TEMPLATE(hdlr, trap, msr, copyee, tfer, ret) \
li r10,trap; \ li r10,trap; \
stw r10,TRAP(r11); \ stw r10,_TRAP(r11); \
lis r10,msr@h; \ lis r10,msr@h; \
ori r10,r10,msr@l; \ ori r10,r10,msr@l; \
copyee(r10, r9); \ copyee(r10, r9); \
......
...@@ -175,7 +175,7 @@ label: \ ...@@ -175,7 +175,7 @@ label: \
#define EXC_XFER_TEMPLATE(n, hdlr, trap, copyee, tfer, ret) \ #define EXC_XFER_TEMPLATE(n, hdlr, trap, copyee, tfer, ret) \
li r10,trap; \ li r10,trap; \
stw r10,TRAP(r11); \ stw r10,_TRAP(r11); \
li r10,MSR_KERNEL; \ li r10,MSR_KERNEL; \
copyee(r10, r9); \ copyee(r10, r9); \
bl tfer; \ bl tfer; \
......
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