arm64: debug: fix mdscr.ss check when enabling debug exceptions
authorWill Deacon <will.deacon@arm.com>
Fri, 17 May 2013 16:41:22 +0000 (17:41 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Fri, 17 May 2013 17:24:19 +0000 (18:24 +0100)
When we take an exception at EL1, we only want to enable debug
exceptions if we're not currently stepping, otherwise we can easily get
stuck in a loop stepping into interrupt handlers.

Unfortunately, the current code tests the wrong bit in the mdscr, so fix
that.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/include/asm/assembler.h

index c8eedc6049844dbb0d2142fa9aca90478e163025..5aceb83b3f5c3c5dd9dc1168a157bb0e41f1c8e9 100644 (file)
@@ -82,7 +82,7 @@
 
        .macro  enable_dbg_if_not_stepping, tmp
        mrs     \tmp, mdscr_el1
-       tbnz    \tmp, #1, 9990f
+       tbnz    \tmp, #0, 9990f
        enable_dbg
 9990:
        .endm