ARM: get rid of needless #if in signal handling code
authorRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 16 Sep 2015 10:08:49 +0000 (11:08 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Wed, 16 Sep 2015 22:58:46 +0000 (23:58 +0100)
Remove the #if statement which caused trouble for kernels that support
both ARMv6 and ARMv7.  Older architectures do not implement these bits,
so it should be safe to always clear them.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/signal.c

index 586eef26203d10631d7a3336972b43fe27101112..29e5dc70bb41f509697a1e1855dcee8d3031ef4b 100644 (file)
@@ -343,7 +343,6 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
                 */
                thumb = handler & 1;
 
-#if __LINUX_ARM_ARCH__ >= 6
                /*
                 * Clear the If-Then Thumb-2 execution state.  ARM spec
                 * requires this to be all 000s in ARM mode.  Snapdragon
@@ -352,11 +351,10 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
                 *
                 * We must do this whenever we are running on a Thumb-2
                 * capable CPU, which includes ARMv6T2.  However, we elect
-                * to do this whenever we're on an ARMv6 or later CPU for
-                * simplicity.
+                * to always do this to simplify the code; this field is
+                * marked UNK/SBZP for older architectures.
                 */
                cpsr &= ~PSR_IT_MASK;
-#endif
 
                if (thumb) {
                        cpsr |= PSR_T_BIT;