linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/5] arm64: debug: Treat the BRPs/WRPs as unsigned
Date: Mon, 23 Nov 2015 17:29:59 +0000	[thread overview]
Message-ID: <20151123172958.GC1702@arm.com> (raw)
In-Reply-To: <1447866540-23207-3-git-send-email-suzuki.poulose@arm.com>

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@linaro.org>
> Reported-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
> Signed-off-by: Suzuki K. Poulose <suzuki.poulose@arm.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@arm.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
> 

  reply	other threads:[~2015-11-23 17:29 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-18 17:03 [PATCH 0/5] arm64: cpufeature: Fixes for 4.4-rc1 Suzuki K. Poulose
2015-11-18 17:08 ` [PATCH 1/5] arm64: cpufeature: Add helpers for extracting unsigned values Suzuki K. Poulose
2015-11-18 17:08   ` [PATCH 2/5] arm64: cpufeature: Track unsigned fields Suzuki K. Poulose
2015-11-19  4:57     ` AKASHI Takahiro
2015-11-19 10:03       ` Suzuki K. Poulose
2015-11-19 10:06         ` Suzuki K. Poulose
2015-11-19 18:45         ` Catalin Marinas
2015-11-20 13:37           ` Suzuki K. Poulose
2015-11-18 17:08   ` [PATCH 3/5] arm64: debug: Treat the BRPs/WRPs as unsigned Suzuki K. Poulose
2015-11-23 17:29     ` Will Deacon [this message]
2015-11-18 17:08   ` [PATCH 4/5] arm64: Make fail_incapable_cpu reusable Suzuki K. Poulose
2015-11-18 17:09   ` [PATCH 5/5] arm64: Ensure the secondary CPUs have safe ASIDBits size Suzuki K. Poulose
2015-11-23 17:29     ` Will Deacon
2015-11-23 23:48       ` Suzuki K. Poulose
2015-11-26 18:13 ` [PATCH 0/5] arm64: cpufeature: Fixes for 4.4-rc1 Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151123172958.GC1702@arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).