diff options
Diffstat (limited to 'arch/arm/kernel/signal.c')
-rw-r--r-- | arch/arm/kernel/signal.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index 80b8b5c7e07..93bb4247b7e 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -426,9 +426,13 @@ setup_return(struct pt_regs *regs, struct k_sigaction *ka, | |||
426 | */ | 426 | */ |
427 | thumb = handler & 1; | 427 | thumb = handler & 1; |
428 | 428 | ||
429 | if (thumb) | 429 | if (thumb) { |
430 | cpsr |= PSR_T_BIT; | 430 | cpsr |= PSR_T_BIT; |
431 | else | 431 | #if __LINUX_ARM_ARCH__ >= 7 |
432 | /* clear the If-Then Thumb-2 execution state */ | ||
433 | cpsr &= ~PSR_IT_MASK; | ||
434 | #endif | ||
435 | } else | ||
432 | cpsr &= ~PSR_T_BIT; | 436 | cpsr &= ~PSR_T_BIT; |
433 | } | 437 | } |
434 | #endif | 438 | #endif |
@@ -532,7 +536,7 @@ setup_rt_frame(int usig, struct k_sigaction *ka, siginfo_t *info, | |||
532 | return err; | 536 | return err; |
533 | } | 537 | } |
534 | 538 | ||
535 | static inline void restart_syscall(struct pt_regs *regs) | 539 | static inline void setup_syscall_restart(struct pt_regs *regs) |
536 | { | 540 | { |
537 | regs->ARM_r0 = regs->ARM_ORIG_r0; | 541 | regs->ARM_r0 = regs->ARM_ORIG_r0; |
538 | regs->ARM_pc -= thumb_mode(regs) ? 2 : 4; | 542 | regs->ARM_pc -= thumb_mode(regs) ? 2 : 4; |
@@ -567,7 +571,7 @@ handle_signal(unsigned long sig, struct k_sigaction *ka, | |||
567 | } | 571 | } |
568 | /* fallthrough */ | 572 | /* fallthrough */ |
569 | case -ERESTARTNOINTR: | 573 | case -ERESTARTNOINTR: |
570 | restart_syscall(regs); | 574 | setup_syscall_restart(regs); |
571 | } | 575 | } |
572 | } | 576 | } |
573 | 577 | ||
@@ -691,7 +695,7 @@ static int do_signal(sigset_t *oldset, struct pt_regs *regs, int syscall) | |||
691 | if (regs->ARM_r0 == -ERESTARTNOHAND || | 695 | if (regs->ARM_r0 == -ERESTARTNOHAND || |
692 | regs->ARM_r0 == -ERESTARTSYS || | 696 | regs->ARM_r0 == -ERESTARTSYS || |
693 | regs->ARM_r0 == -ERESTARTNOINTR) { | 697 | regs->ARM_r0 == -ERESTARTNOINTR) { |
694 | restart_syscall(regs); | 698 | setup_syscall_restart(regs); |
695 | } | 699 | } |
696 | } | 700 | } |
697 | single_step_set(current); | 701 | single_step_set(current); |