Skip to content

Commit

Permalink
arm64: debug: remove redundant spsr manipulation
Browse files Browse the repository at this point in the history
There is no need to explicitly clear the SS bit immediately before
setting it unconditionally.

Reported-by: Catalin Marinas <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
wildea01 authored and ctmarinas committed Jul 19, 2016
1 parent 2ce39ad commit 6b68e14
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions arch/arm64/kernel/debug-monitors.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6b68e14

Please sign in to comment.