Commit 03923696 authored by Dave P Martin's avatar Dave P Martin Committed by Will Deacon

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: default avatarDave Martin <Dave.Martin@arm.com>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent dfac6831
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment