]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
arm64/debug: Mask off all reserved bits from generated ESR values
authorDave P Martin <Dave.Martin@arm.com>
Fri, 24 Jul 2015 15:37:42 +0000 (16:37 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:42 +0000 (11:08 +0100)
There are only 16 comment bits in a BRK instruction, which
correspond to ESR bits 15:0.  Bits 24:16 of the ESR are RES0,
and might have weird meanings in the future.

This code inserts 16 bits of comment in the ESR value instead of
20 (almost certainly a typo in the original code).

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>
arch/arm64/include/asm/debug-monitors.h

index f3d2dbd5f0a72f5bfdf924818c1c8cbec4842f2b..ab7d5a875f8db1dd670d419d78cf6b7c9e445479 100644 (file)
@@ -45,7 +45,7 @@
 /*
  * ESR values expected for dynamic and compile time BRK instruction
  */
-#define DBG_ESR_VAL_BRK(x)     (0xf2000000 | ((x) & 0xfffff))
+#define DBG_ESR_VAL_BRK(x)     (0xf2000000 | ((x) & 0xffff))
 
 /*
  * #imm16 values used for BRK instruction generation