diff options
Diffstat (limited to 'arch/arm/kernel/signal.c')
-rw-r--r-- | arch/arm/kernel/signal.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c index b6cda06b455f..7b8f2141427b 100644 --- a/arch/arm/kernel/signal.c +++ b/arch/arm/kernel/signal.c | |||
@@ -343,15 +343,18 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig, | |||
343 | */ | 343 | */ |
344 | thumb = handler & 1; | 344 | thumb = handler & 1; |
345 | 345 | ||
346 | #if __LINUX_ARM_ARCH__ >= 7 | ||
347 | /* | 346 | /* |
348 | * Clear the If-Then Thumb-2 execution state | 347 | * Clear the If-Then Thumb-2 execution state. ARM spec |
349 | * ARM spec requires this to be all 000s in ARM mode | 348 | * requires this to be all 000s in ARM mode. Snapdragon |
350 | * Snapdragon S4/Krait misbehaves on a Thumb=>ARM | 349 | * S4/Krait misbehaves on a Thumb=>ARM signal transition |
351 | * signal transition without this. | 350 | * without this. |
351 | * | ||
352 | * We must do this whenever we are running on a Thumb-2 | ||
353 | * capable CPU, which includes ARMv6T2. However, we elect | ||
354 | * to always do this to simplify the code; this field is | ||
355 | * marked UNK/SBZP for older architectures. | ||
352 | */ | 356 | */ |
353 | cpsr &= ~PSR_IT_MASK; | 357 | cpsr &= ~PSR_IT_MASK; |
354 | #endif | ||
355 | 358 | ||
356 | if (thumb) { | 359 | if (thumb) { |
357 | cpsr |= PSR_T_BIT; | 360 | cpsr |= PSR_T_BIT; |