linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] ARM: hw_breakpoint: only clear OS lock when implemented on v7
Date: Wed, 24 Oct 2012 15:53:29 -0700	[thread overview]
Message-ID: <50887169.4060209@codeaurora.org> (raw)
In-Reply-To: <1350487901-3108-2-git-send-email-will.deacon@arm.com>

On 10/17/12 08:31, Will Deacon wrote:
> The OS save and restore register are optional in debug architecture v7,
> so check the status register before attempting to clear the OS lock.
>
> Signed-off-by: Will Deacon <will.deacon@arm.com>

Tested-by: Stephen Boyd <sboyd@codeaurora.org>

> ---
>  arch/arm/kernel/hw_breakpoint.c |   10 +++++++++-
>  1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/kernel/hw_breakpoint.c b/arch/arm/kernel/hw_breakpoint.c
> index 281bf33..ec16ada 100644
> --- a/arch/arm/kernel/hw_breakpoint.c
> +++ b/arch/arm/kernel/hw_breakpoint.c
> @@ -929,6 +929,13 @@ static void reset_ctrl_regs(void *unused)
>  		asm volatile("mrc p14, 0, %0, c1, c5, 4" : "=r" (dbg_power));
>  		if ((dbg_power & 0x1) == 0)
>  			err = -EPERM;
> +
> +		/*
> +		 * Check whether we implement OS save and restore.
> +		 */
> +		asm volatile("mrc p14, 0, %0, c1, c1, 4" : "=r" (dbg_power));

minor nit for this series. dbg_power has become a catch-all variable in
this code. It would be nice if we named the variables used to hold the
read register the same as the register or if we made the name of the
variable generic like 'val'.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  reply	other threads:[~2012-10-24 22:53 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-17 15:31 [PATCH 0/7] ARM: hw_breakpoint: fix reset sequence for debug arch v7.1 Will Deacon
2012-10-17 15:31 ` [PATCH 1/7] ARM: hw_breakpoint: only clear OS lock when implemented on v7 Will Deacon
2012-10-24 22:53   ` Stephen Boyd [this message]
2012-10-25 14:49     ` Will Deacon
2012-10-17 15:31 ` [PATCH 2/7] ARM: hw_breakpoint: fix monitor mode detection with v7.1 Will Deacon
2012-10-24 22:53   ` Stephen Boyd
2012-10-17 15:31 ` [PATCH 3/7] ARM: hw_breakpoint: fix ordering of debug register reset sequence Will Deacon
2012-10-24 22:53   ` Stephen Boyd
2012-10-17 15:31 ` [PATCH 4/7] ARM: hw_breakpoint: don't try to clear v6 debug registers during boot Will Deacon
2012-10-24 22:53   ` Stephen Boyd
2012-10-17 15:31 ` [PATCH 5/7] ARM: hw_breakpoint: make boot quieter without CPUID feature registers Will Deacon
2012-10-24 22:53   ` Stephen Boyd
2012-10-17 15:31 ` [PATCH 6/7] ARM: hw_breakpoint: check if monitor mode is enabled during validation Will Deacon
2012-10-17 15:31 ` [PATCH 7/7] ARM: hw_breakpoint: use CRn as argument for debug reg accessor macros Will Deacon
2012-10-24 22:54   ` Stephen Boyd

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=50887169.4060209@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --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).