diff options
Diffstat (limited to 'arch/sh/kernel/signal.c')
-rw-r--r-- | arch/sh/kernel/signal.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/sh/kernel/signal.c b/arch/sh/kernel/signal.c index 5213f5bc6ce0..764886b4bcf1 100644 --- a/arch/sh/kernel/signal.c +++ b/arch/sh/kernel/signal.c | |||
@@ -98,7 +98,11 @@ sys_sigaltstack(const stack_t __user *uss, stack_t __user *uoss, | |||
98 | */ | 98 | */ |
99 | 99 | ||
100 | #define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */ | 100 | #define MOVW(n) (0x9300|((n)-2)) /* Move mem word at PC+n to R3 */ |
101 | #define TRAP16 0xc310 /* Syscall w/no args (NR in R3) */ | 101 | #if defined(CONFIG_CPU_SH2) || defined(CONFIG_CPU_SH2A) |
102 | #define TRAP_NOARG 0xc320 /* Syscall w/no args (NR in R3) */ | ||
103 | #else | ||
104 | #define TRAP_NOARG 0xc310 /* Syscall w/no args (NR in R3) */ | ||
105 | #endif | ||
102 | #define OR_R0_R0 0x200b /* or r0,r0 (insert to avoid hardware bug) */ | 106 | #define OR_R0_R0 0x200b /* or r0,r0 (insert to avoid hardware bug) */ |
103 | 107 | ||
104 | struct sigframe | 108 | struct sigframe |
@@ -350,7 +354,7 @@ static int setup_frame(int sig, struct k_sigaction *ka, | |||
350 | } else { | 354 | } else { |
351 | /* Generate return code (system call to sigreturn) */ | 355 | /* Generate return code (system call to sigreturn) */ |
352 | err |= __put_user(MOVW(7), &frame->retcode[0]); | 356 | err |= __put_user(MOVW(7), &frame->retcode[0]); |
353 | err |= __put_user(TRAP16, &frame->retcode[1]); | 357 | err |= __put_user(TRAP_NOARG, &frame->retcode[1]); |
354 | err |= __put_user(OR_R0_R0, &frame->retcode[2]); | 358 | err |= __put_user(OR_R0_R0, &frame->retcode[2]); |
355 | err |= __put_user(OR_R0_R0, &frame->retcode[3]); | 359 | err |= __put_user(OR_R0_R0, &frame->retcode[3]); |
356 | err |= __put_user(OR_R0_R0, &frame->retcode[4]); | 360 | err |= __put_user(OR_R0_R0, &frame->retcode[4]); |
@@ -430,7 +434,7 @@ static int setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info, | |||
430 | } else { | 434 | } else { |
431 | /* Generate return code (system call to rt_sigreturn) */ | 435 | /* Generate return code (system call to rt_sigreturn) */ |
432 | err |= __put_user(MOVW(7), &frame->retcode[0]); | 436 | err |= __put_user(MOVW(7), &frame->retcode[0]); |
433 | err |= __put_user(TRAP16, &frame->retcode[1]); | 437 | err |= __put_user(TRAP_NOARG, &frame->retcode[1]); |
434 | err |= __put_user(OR_R0_R0, &frame->retcode[2]); | 438 | err |= __put_user(OR_R0_R0, &frame->retcode[2]); |
435 | err |= __put_user(OR_R0_R0, &frame->retcode[3]); | 439 | err |= __put_user(OR_R0_R0, &frame->retcode[3]); |
436 | err |= __put_user(OR_R0_R0, &frame->retcode[4]); | 440 | err |= __put_user(OR_R0_R0, &frame->retcode[4]); |