Skip to content

Commit 72d033e

Browse files
Dave P Martinwildea01
authored andcommitted
arm64/debug: Move BRK ESR template macro into <asm/esr.h>
It makes sense to keep all the architectural exception syndrome definitions in the same place. 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>
1 parent c172d99 commit 72d033e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

arch/arm64/include/asm/debug-monitors.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,6 @@
4343
*/
4444
#define BREAK_INSTR_SIZE AARCH64_INSN_SIZE
4545

46-
/*
47-
* ESR values expected for dynamic and compile time BRK instruction
48-
*/
49-
#define ESR_ELx_VAL_BRK64(imm) \
50-
((ESR_ELx_EC_BRK64 << ESR_ELx_EC_SHIFT) | ESR_ELx_IL | \
51-
((imm) & 0xffff))
52-
5346
/*
5447
* #imm16 values used for BRK instruction generation
5548
* Allowed values for kgbd are 0x400 - 0x7ff

arch/arm64/include/asm/esr.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@
9999
#define ESR_ELx_WFx_ISS_WFE (UL(1) << 0)
100100
#define ESR_ELx_xVC_IMM_MASK ((1UL << 16) - 1)
101101

102+
/* ESR value templates for specific events */
103+
104+
/* BRK instruction trap from AArch64 state */
105+
#define ESR_ELx_VAL_BRK64(imm) \
106+
((ESR_ELx_EC_BRK64 << ESR_ELx_EC_SHIFT) | ESR_ELx_IL | \
107+
((imm) & 0xffff))
108+
102109
#ifndef __ASSEMBLY__
103110
#include <asm/types.h>
104111

0 commit comments

Comments
 (0)