summaryrefslogtreecommitdiff
path: root/arch/arm64/kernel
diff options
context:
space:
mode:
authorWill Deacon <will.deacon@arm.com>2016-07-19 15:07:38 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2016-07-19 16:58:56 +0100
commit6b68e14e71b0a6811ed776c6261d4e6c0389e2c0 (patch)
treebee3a0bd6eba1080dcd4677ae62aeeff8e8d1949 /arch/arm64/kernel
parent2ce39ad15182604beb6c8fa8bed5e46b59fd1082 (diff)
downloadlwn-6b68e14e71b0a6811ed776c6261d4e6c0389e2c0.tar.gz
lwn-6b68e14e71b0a6811ed776c6261d4e6c0389e2c0.zip
arm64: debug: remove redundant spsr manipulation
There is no need to explicitly clear the SS bit immediately before setting it unconditionally. Reported-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/kernel')
-rw-r--r--arch/arm64/kernel/debug-monitors.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
index 0800d23e2fdd..f17134d39e6b 100644
--- a/arch/arm64/kernel/debug-monitors.c
+++ b/arch/arm64/kernel/debug-monitors.c
@@ -165,21 +165,12 @@ postcore_initcall(debug_monitors_init);
*/
static void set_regs_spsr_ss(struct pt_regs *regs)
{
- unsigned long spsr;
-
- spsr = regs->pstate;
- spsr &= ~DBG_SPSR_SS;
- spsr |= DBG_SPSR_SS;
- regs->pstate = spsr;
+ regs->pstate |= DBG_SPSR_SS;
}
static void clear_regs_spsr_ss(struct pt_regs *regs)
{
- unsigned long spsr;
-
- spsr = regs->pstate;
- spsr &= ~DBG_SPSR_SS;
- regs->pstate = spsr;
+ regs->pstate &= ~DBG_SPSR_SS;
}
/* EL1 Single Step Handler hooks */