arm64/debug: Eliminate magic number for size of BRK instruction
authorDave P Martin <[email protected]>
Fri, 24 Jul 2015 15:37:41 +0000 (16:37 +0100)
committerWill Deacon <[email protected]>
Mon, 27 Jul 2015 10:08:42 +0000 (11:08 +0100)
The size of an A64 BRK instruction is the same as the size of all other
A64 instructions, because all A64 instructions are the same size.

BREAK_INSTR_SIZE is retained for readibility, but it should not be
an independent constant from AARCH64_INSN_SIZE.

Signed-off-by: Dave Martin <[email protected]>
Acked-by: Mark Rutland <[email protected]>
Acked-by: Catalin Marinas <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
arch/arm64/include/asm/debug-monitors.h

index 40ec68aa6870175714d76d57b64ddb975c0eb5a8..f3d2dbd5f0a72f5bfdf924818c1c8cbec4842f2b 100644 (file)
@@ -18,6 +18,8 @@
 
 #ifdef __KERNEL__
 
+#include <asm/insn.h>
+
 /* Low-level stepping controls. */
 #define DBG_MDSCR_SS           (1 << 0)
 #define DBG_SPSR_SS            (1 << 21)
@@ -38,7 +40,7 @@
 /*
  * Break point instruction encoding
  */
-#define BREAK_INSTR_SIZE               4
+#define BREAK_INSTR_SIZE               AARCH64_INSN_SIZE
 
 /*
  * ESR values expected for dynamic and compile time BRK instruction