[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151123172958.GC1702@arm.com>
Date: Mon, 23 Nov 2015 17:29:59 +0000
From: Will Deacon <will.deacon@....com>
To: "Suzuki K. Poulose" <suzuki.poulose@....com>
Cc: linux-arm-kernel@...ts.infradead.org, catalin.marinas@....com,
mark.rutland@....com, ard.biesheuvel@...aro.org,
linux-kernel@...r.kernel.org, takahiro.akashi@...aro.org
Subject: Re: [PATCH 3/5] arm64: debug: Treat the BRPs/WRPs as unsigned
On Wed, Nov 18, 2015 at 05:08:58PM +0000, Suzuki K. Poulose wrote:
> IDAA64DFR0_EL1: BRPs and WRPs are unsigned values. Use
> the appropriate helpers to extract those fields.
>
> Cc: Ard Biesheuvel <ard.biesheuvel@...aro.org>
> Reported-by: AKASHI Takahiro <takahiro.akashi@...aro.org>
> Signed-off-by: Suzuki K. Poulose <suzuki.poulose@....com>
> ---
> arch/arm64/include/asm/hw_breakpoint.h | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
Once you've got the dependencies sorted out:
Acked-by: Will Deacon <will.deacon@....com>
Will
> diff --git a/arch/arm64/include/asm/hw_breakpoint.h b/arch/arm64/include/asm/hw_breakpoint.h
> index e54415e..9732908 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);
> }
>
> --
> 1.7.9.5
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists