summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/debug-monitors.h
diff options
context:
space:
mode:
authorDave P Martin <Dave.Martin@arm.com>2015-07-24 18:37:43 +0300
committerWill Deacon <will.deacon@arm.com>2015-07-27 13:08:42 +0300
commit03923696a966bd3eeb3a169d71b8a337aaa5ab76 (patch)
tree2b4c27b27b86bcf7525c1a6037416d92fec2579e /arch/arm64/include/asm/debug-monitors.h
parentdfac68314c969481fcce3dd528728dfa9d85caf5 (diff)
downloadlinux-03923696a966bd3eeb3a169d71b8a337aaa5ab76.tar.xz
arm64/debug: Eliminate magic number from ESR template definition
<asm/esr.h> has perfectly good constants for defining ESR values already. Let's use them. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Acked-by: Mark Rutland <mark.rutland@arm.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64/include/asm/debug-monitors.h')
-rw-r--r--arch/arm64/include/asm/debug-monitors.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/arm64/include/asm/debug-monitors.h b/arch/arm64/include/asm/debug-monitors.h
index ab7d5a875f8d..ff09058587e3 100644
--- a/arch/arm64/include/asm/debug-monitors.h
+++ b/arch/arm64/include/asm/debug-monitors.h
@@ -18,6 +18,7 @@
#ifdef __KERNEL__
+#include <asm/esr.h>
#include <asm/insn.h>
/* Low-level stepping controls. */
@@ -45,7 +46,8 @@
/*
* ESR values expected for dynamic and compile time BRK instruction
*/
-#define DBG_ESR_VAL_BRK(x) (0xf2000000 | ((x) & 0xffff))
+#define DBG_ESR_VAL_BRK(x) \
+ ((ESR_ELx_EC_BRK64 << ESR_ELx_EC_SHIFT) | ESR_ELx_IL | ((x) & 0xffff))
/*
* #imm16 values used for BRK instruction generation