arm64: Clear OSDLR_EL1 on CPU boot
authorJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Mon, 8 Apr 2019 17:17:18 +0000 (18:17 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 9 Apr 2019 11:38:31 +0000 (12:38 +0100)
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>
arch/arm64/kernel/debug-monitors.c

index 800486cc48239a3c4bb392efe9779eb4fb87a60f..555b6bd2f3d68f1fb451af110e26a500c8f2738a 100644 (file)
@@ -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;