diff options
| -rw-r--r-- | arch/arm/kernel/signal.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index ab3304225272..1aa5ecdd1b3d 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
| @@ -375,12 +375,18 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, | |||
| 375 | */ | 375 | */ |
| 376 | thumb = handler & 1; | 376 | thumb = handler & 1; |
| 377 | 377 | ||
| 378 | if (thumb) { | ||
| 379 | cpsr |= PSR_T_BIT; | ||
| 380 | #if __LINUX_ARM_ARCH__ >= 7 | 378 | #if __LINUX_ARM_ARCH__ >= 7 |
| 381 | /* clear the If-Then Thumb-2 execution state */ | 379 | /* |
| 382 | cpsr &= ~PSR_IT_MASK; | 380 | * Clear the If-Then Thumb-2 execution state |
| 381 | * ARM spec requires this to be all 000s in ARM mode | ||
| 382 | * Snapdragon S4/Krait misbehaves on a Thumb=>ARM | ||
| 383 | * signal transition without this. | ||
| 384 | */ | ||
| 385 | cpsr &= ~PSR_IT_MASK; | ||
| 383 | #endif | 386 | #endif |
| 387 | |||
| 388 | if (thumb) { | ||
| 389 | cpsr |= PSR_T_BIT; | ||
| 384 | } else | 390 | } else |
| 385 | cpsr &= ~PSR_T_BIT; | 391 | cpsr &= ~PSR_T_BIT; |
| 386 | } | 392 | } |
