arm64: debug-monitors: Disable preemption
The helpers kernel_{en,dis}able_single_step check that interrupts
are disabled when they are called as they are setting the per-cpu
MDSCR_EL1 register.
But we don't expect single step to have an effect until we ERET with
SPSR.SS set. We may ERET to a context that has interrupts unmasked,
take an interrupt and switch CPU. This leaves MDSCR_EL1.SS set on
one CPU, and SPSR.SS set on another.
Stop this by wrapping the MDSCR_EL1 writes in preempt_{en,dis}able().
Signed-off-by:
James Morse <james.morse@arm.com>
Loading
Please register or sign in to comment