From: "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca>
To: linux-kernel@vger.kernel.org
Cc: Paul Mackerras <paulus@samba.org>,
Michael Ellerman <mpe@ellerman.id.au>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] powerpc: Fix sstep compile on powerpcspe
Date: Thu, 5 May 2016 16:53:29 -0400 [thread overview]
Message-ID: <20160505205329.GG3264@csclub.uwaterloo.ca> (raw)
In-Reply-To: <20160505204444.GE3264@csclub.uwaterloo.ca>
On Thu, May 05, 2016 at 04:44:44PM -0400, Lennart Sorensen wrote:
> powerpc: Fix sstep compile on powerpcspe
>
> Commit be96f63375a14ee8e690856ac77e579c75bd0bae introduced ldarx and stdcx
> into the instructions in sstep.c, which are not accepted by the assembler
> on powerpcspe, but does seem to be accepted by the normal powerpc assembler
> even in 32 bit mode.
>
> Wrap these two instructions in a __powerpc64__ check like it is everywhere
> else in the file.
>
> Fixes: be96f63375a1 ("powerpc: Split out instruction analysis part of emulate_step()")
> Signed-off-by: Len Sorensen <lsorense@csclub.uwaterloo.ca>
> ---
> arch/powerpc/lib/sstep.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/powerpc/lib/sstep.c b/arch/powerpc/lib/sstep.c
> index dc885b3..6d34310 100644
> --- a/arch/powerpc/lib/sstep.c
> +++ b/arch/powerpc/lib/sstep.c
> @@ -1818,9 +1818,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
> case 4:
> __get_user_asmx(val, op.ea, err, "lwarx");
> break;
> +#ifdef __powerpc64__
> case 8:
> __get_user_asmx(val, op.ea, err, "ldarx");
> break;
> +#endif
> default:
> return 0;
> }
> @@ -1841,9 +1843,11 @@ int __kprobes emulate_step(struct pt_regs *regs, unsigned int instr)
> case 4:
> __put_user_asmx(op.val, op.ea, err, "stwcx.", cr);
> break;
> +#ifdef __powerpc64__
> case 8:
> __put_user_asmx(op.val, op.ea, err, "stdcx.", cr);
> break;
> +#endif
> default:
> return 0;
> }
> --
> 1.7.10.4
Perhaps this should be considered for -stable as well since it is fixing
a regression for powerpcspe.
--
Len Sorensen
next prev parent reply other threads:[~2016-05-05 20:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-05 20:44 [PATCH] powerpc: Fix sstep compile on powerpcspe Lennart Sorensen
2016-05-05 20:53 ` Lennart Sorensen [this message]
2016-05-10 21:48 ` Michael Ellerman
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=20160505205329.GG3264@csclub.uwaterloo.ca \
--to=lsorense@csclub.uwaterloo.ca \
--cc=benh@kernel.crashing.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.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).