diff options
author | Suzuki K. Poulose <[email protected]> | 2015-11-18 17:08:58 +0000 |
---|---|---|
committer | Catalin Marinas <[email protected]> | 2015-11-26 18:08:36 +0000 |
commit | 1944bf8e78b7178f8ebfeefaced738ce1d111a4c (patch) | |
tree | f82b8e3ada07b28f43a07052bca45c0b275f5067 | |
parent | 4f0a606bce5ecd3a8210e896c33f41d1bf7f752f (diff) |
arm64: debug: Treat the BRPs/WRPs as unsigned
IDAA64DFR0_EL1: BRPs and WRPs are unsigned values. Use
the appropriate helpers to extract those fields.
Cc: Ard Biesheuvel <[email protected]>
Reported-by: AKASHI Takahiro <[email protected]>
Acked-by: Will Deacon <[email protected]>
Signed-off-by: Suzuki K. Poulose <[email protected]>
Signed-off-by: Catalin Marinas <[email protected]>
-rw-r--r-- | arch/arm64/include/asm/hw_breakpoint.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/arm64/include/asm/hw_breakpoint.h b/arch/arm64/include/asm/hw_breakpoint.h index e54415ec6935..9732908bfc8a 100644 --- a/arch/arm64/include/asm/hw_breakpoint.h +++ b/arch/arm64/include/asm/hw_breakpoint.h @@ -138,16 +138,18 @@ extern struct pmu perf_ops_bp; /* Determine number of BRP registers available. */ static inline int get_num_brps(void) { + u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1); return 1 + - cpuid_feature_extract_field(read_system_reg(SYS_ID_AA64DFR0_EL1), + cpuid_feature_extract_unsigned_field(dfr0, ID_AA64DFR0_BRPS_SHIFT); } /* Determine number of WRP registers available. */ static inline int get_num_wrps(void) { + u64 dfr0 = read_system_reg(SYS_ID_AA64DFR0_EL1); return 1 + - cpuid_feature_extract_field(read_system_reg(SYS_ID_AA64DFR0_EL1), + cpuid_feature_extract_unsigned_field(dfr0, ID_AA64DFR0_WRPS_SHIFT); } |