From: Jean-Philippe Brucker Date: Mon, 8 Apr 2019 17:17:18 +0000 (+0100) Subject: arm64: Clear OSDLR_EL1 on CPU boot X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=6fda41bf12615ee7c3ddac88155099b1a8cf8d00;p=openwrt%2Fstaging%2Fblogic.git arm64: Clear OSDLR_EL1 on CPU boot Some firmwares may reboot CPUs with OS Double Lock set. Make sure that it is unlocked, in order to use debug exceptions. Cc: Signed-off-by: Jean-Philippe Brucker Signed-off-by: Will Deacon --- diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c index 800486cc4823..555b6bd2f3d6 100644 --- a/arch/arm64/kernel/debug-monitors.c +++ b/arch/arm64/kernel/debug-monitors.c @@ -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;