Skip to content

Commit

Permalink
arm64: Clear OSDLR_EL1 on CPU boot
Browse files Browse the repository at this point in the history
Some firmwares may reboot CPUs with OS Double Lock set. Make sure that
it is unlocked, in order to use debug exceptions.

Cc: <stable@vger.kernel.org>
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Jean-Philippe Brucker authored and wildea01 committed Apr 9, 2019
1 parent 475ba3f commit 6fda41b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm64/kernel/debug-monitors.c
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ NOKPROBE_SYMBOL(disable_debug_monitors);
*/
static int clear_os_lock(unsigned int cpu)
{
write_sysreg(0, osdlr_el1);
write_sysreg(0, oslar_el1);
isb();
return 0;
Expand Down

0 comments on commit 6fda41b

Please sign in to comment.