[PATCH] arm: remove unnecessary code for handling SA_THIRTYTWO

Peter Collingbourne pcc at google.com
Mon Aug 17 23:17:08 EDT 2020


Support for 26-bit ARM was removed back in commit 99eb8a550dbc ("Remove
the arm26 port") from 2007. This remaining code was intended to
potentially set the MODE_MASK bits of CPSR from the previously-defined
USR26_MODE to USR_MODE. However, we can now expect CPSR to always be
set to USR_MODE at this point, so the code was not doing anything.

Signed-off-by: Peter Collingbourne <pcc at google.com>
---
View this change in Gerrit: https://linux-review.googlesource.com/q/Icf0635756e8591c6af22fb86319d3ca9df4a6b87

 arch/arm/kernel/signal.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/arch/arm/kernel/signal.c b/arch/arm/kernel/signal.c
index c9dc912b83f0..7c0f33c38d2b 100644
--- a/arch/arm/kernel/signal.c
+++ b/arch/arm/kernel/signal.c
@@ -380,12 +380,6 @@ setup_return(struct pt_regs *regs, struct ksignal *ksig,
 
 	cpsr |= PSR_ENDSTATE;
 
-	/*
-	 * Maybe we need to deliver a 32-bit signal to a 26-bit task.
-	 */
-	if (ksig->ka.sa.sa_flags & SA_THIRTYTWO)
-		cpsr = (cpsr & ~MODE_MASK) | USR_MODE;
-
 #ifdef CONFIG_ARM_THUMB
 	if (elf_hwcap & HWCAP_THUMB) {
 		/*
-- 
2.28.0.220.ged08abb693-goog




More information about the linux-arm-kernel mailing list