From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754527AbbKWRaF (ORCPT ); Mon, 23 Nov 2015 12:30:05 -0500 Received: from foss.arm.com ([217.140.101.70]:57512 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754171AbbKWRaD (ORCPT ); Mon, 23 Nov 2015 12:30:03 -0500 Date: Mon, 23 Nov 2015 17:29:59 +0000 From: Will Deacon To: "Suzuki K. Poulose" Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, mark.rutland@arm.com, ard.biesheuvel@linaro.org, linux-kernel@vger.kernel.org, takahiro.akashi@linaro.org Subject: Re: [PATCH 3/5] arm64: debug: Treat the BRPs/WRPs as unsigned Message-ID: <20151123172958.GC1702@arm.com> References: <1447866238-22970-1-git-send-email-suzuki.poulose@arm.com> <1447866540-23207-1-git-send-email-suzuki.poulose@arm.com> <1447866540-23207-3-git-send-email-suzuki.poulose@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447866540-23207-3-git-send-email-suzuki.poulose@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Reported-by: AKASHI Takahiro > Signed-off-by: Suzuki K. Poulose > --- > 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 > 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: will.deacon@arm.com (Will Deacon) Date: Mon, 23 Nov 2015 17:29:59 +0000 Subject: [PATCH 3/5] arm64: debug: Treat the BRPs/WRPs as unsigned In-Reply-To: <1447866540-23207-3-git-send-email-suzuki.poulose@arm.com> References: <1447866238-22970-1-git-send-email-suzuki.poulose@arm.com> <1447866540-23207-1-git-send-email-suzuki.poulose@arm.com> <1447866540-23207-3-git-send-email-suzuki.poulose@arm.com> Message-ID: <20151123172958.GC1702@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org 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 > Reported-by: AKASHI Takahiro > Signed-off-by: Suzuki K. Poulose > --- > 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 > 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 >