From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4] arm64: debug: remove redundant spsr manipulation
Date: Tue, 19 Jul 2016 15:36:50 +0100 [thread overview]
Message-ID: <20160719143614.GA22473@leverpostej> (raw)
In-Reply-To: <1468937260-23988-2-git-send-email-will.deacon@arm.com>
On Tue, Jul 19, 2016 at 03:07:38PM +0100, Will Deacon wrote:
> There is no need to explicitly clear the SS bit immediately before
> setting it unconditionally.
>
> Reported-by: Catalin Marinas <catalin.marinas@arm.com>
> Signed-off-by: Will Deacon <will.deacon@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Mark.
> ---
> arch/arm64/kernel/debug-monitors.c | 13 ++-----------
> 1 file changed, 2 insertions(+), 11 deletions(-)
>
> diff --git a/arch/arm64/kernel/debug-monitors.c b/arch/arm64/kernel/debug-monitors.c
> index 7a907e401c98..91fff48d0f57 100644
> --- a/arch/arm64/kernel/debug-monitors.c
> +++ b/arch/arm64/kernel/debug-monitors.c
> @@ -170,22 +170,13 @@ postcore_initcall(debug_monitors_init);
> */
> static void set_regs_spsr_ss(struct pt_regs *regs)
> {
> - unsigned long spsr;
> -
> - spsr = regs->pstate;
> - spsr &= ~DBG_SPSR_SS;
> - spsr |= DBG_SPSR_SS;
> - regs->pstate = spsr;
> + regs->pstate |= DBG_SPSR_SS;
> }
> NOKPROBE_SYMBOL(set_regs_spsr_ss);
>
> static void clear_regs_spsr_ss(struct pt_regs *regs)
> {
> - unsigned long spsr;
> -
> - spsr = regs->pstate;
> - spsr &= ~DBG_SPSR_SS;
> - regs->pstate = spsr;
> + regs->pstate &= ~DBG_SPSR_SS;
> }
> NOKPROBE_SYMBOL(clear_regs_spsr_ss);
>
> --
> 2.1.4
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
next prev parent reply other threads:[~2016-07-19 14:36 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 14:07 [PATCH 1/4] arm64: debug: unmask PSTATE.D earlier Will Deacon
2016-07-19 14:07 ` [PATCH 2/4] arm64: debug: remove redundant spsr manipulation Will Deacon
2016-07-19 14:36 ` Mark Rutland [this message]
2016-07-19 14:07 ` [PATCH 3/4] arm64: kprobes: WARN if attempting to step with PSTATE.D=1 Will Deacon
2016-07-19 14:37 ` Mark Rutland
2016-08-03 12:22 ` Pratyush Anand
2016-08-09 12:48 ` Will Deacon
2016-08-10 8:01 ` Pratyush Anand
2016-08-10 12:04 ` Masami Hiramatsu
2016-08-12 12:46 ` Pratyush Anand
2016-08-15 12:56 ` Pratyush Anand
2016-07-19 14:07 ` [PATCH 4/4] arm64: debug: remove unused local_dbg_{enable, disable} macros Will Deacon
2016-07-19 14:38 ` Mark Rutland
2016-07-19 14:23 ` [PATCH 1/4] arm64: debug: unmask PSTATE.D earlier 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=20160719143614.GA22473@leverpostej \
--to=mark.rutland@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