Skip to content

Commit

Permalink
arm64: entry.S: Remove disable_dbg
Browse files Browse the repository at this point in the history
enable_step_tsk is the only user of disable_dbg, which doesn't respect
our 'dai' order for exception masking. enable_step_tsk may enable
single-step, so previously needed to mask debug exceptions to prevent us
from single-stepping kernel_exit. enable_step_tsk is called at the end
of the ret_to_user loop, which has already masked all exceptions so this
is no longer needed.

Remove disable_dbg, add a comment that enable_step_tsk's caller should
have masked debug.

Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Julien Thierry <julien.thierry@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
James Morse authored and Will Deacon committed Nov 2, 2017
1 parent 8d66772 commit 84d0fb1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions arch/arm64/include/asm/assembler.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@
msr daif, \flags
.endm

/*
* Enable and disable debug exceptions.
*/
.macro disable_dbg
msr daifset, #8
.endm

.macro enable_dbg
msr daifclr, #8
.endm
Expand All @@ -89,9 +82,9 @@
9990:
.endm

/* call with daif masked */
.macro enable_step_tsk, flgs, tmp
tbz \flgs, #TIF_SINGLESTEP, 9990f
disable_dbg
mrs \tmp, mdscr_el1
orr \tmp, \tmp, #DBG_MDSCR_SS
msr mdscr_el1, \tmp
Expand Down

0 comments on commit 84d0fb1

Please sign in to comment.