summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel
diff options
context:
space:
mode:
authorCatalin Marinas <catalin.marinas@arm.com>2009-05-30 14:00:15 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2009-05-30 14:00:15 +0100
commitd71e1352e240dea32d481ad8d662e8de4406ac7e (patch)
tree823bd3c503988520319b4658d1f2a8b8b4cb1328 /arch/arm/kernel
parentba3c02636a0743a62cb50b920d36e1c046ab88cf (diff)
downloadop-kernel-dev-d71e1352e240dea32d481ad8d662e8de4406ac7e.zip
op-kernel-dev-d71e1352e240dea32d481ad8d662e8de4406ac7e.tar.gz
Clear the IT state when invoking a Thumb-2 signal handler
If a process is interrupted during an If-Then block and a signal is invoked, the ITSTATE bits must be cleared otherwise the handler would not run correctly. Signed-off-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Joseph S. Myers <joseph@codesourcery.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r--arch/arm/kernel/signal.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index 80b8b5c..442b874 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,
*/
thumb = handler & 1;
- if (thumb)
+ if (thumb) {
cpsr |= PSR_T_BIT;
- else
+#if __LINUX_ARM_ARCH__ >= 7
+ /* clear the If-Then Thumb-2 execution state */
+ cpsr &= ~PSR_IT_MASK;
+#endif
+ } else
cpsr &= ~PSR_T_BIT;
}
#endif
OpenPOWER on IntegriCloud