From: Michael Ellerman <mpe@ellerman.id.au>
To: Michael Neuling <mikey@neuling.org>,
Chris Smart <chris@distroguy.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH 2/2] selftests/powerpc: Test unaligned copy and paste
Date: Thu, 09 Jun 2016 20:50:03 +1000 [thread overview]
Message-ID: <1465469403.31662.7.camel@ellerman.id.au> (raw)
In-Reply-To: <1465457196.14163.3.camel@neuling.org>
On Thu, 2016-06-09 at 17:26 +1000, Michael Neuling wrote:
> On Thu, 2016-06-09 at 16:02 +1000, Chris Smart wrote:
> > Test that an ISA 3.0 compliant machine performing an unaligned copy,
> > copy_first, paste or paste_last is sent a SIGBUS.
>
> It's probably overkill but we could check in the signal handler that the
> sigbus was on the instruction we actually cared about. ie something like
> this in the sig handler for copy first.
>
> static void sig_handler(int signr, siginfo_t *info, void *ucontext)
> {
> ucontext_t *ctx = ucontext;
> unsigned int *pc = ctx->uc_mcontext.gp_regs[PT_NIP];
You're a hard taskmaster.
For it to build on 32-bit BE, you'll need:
#if defined(__powerpc64__)
pc = ctx->uc_mcontext.gp_regs[PT_NIP];
#else
pc = ctx->uc_mcontext.uc_regs->gregs[PT_NIP]
#endif
cheers
prev parent reply other threads:[~2016-06-09 10:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <db3d861c85eb7c49362eec1a973ad023cfff82df.1465451957.git.chris@distroguy.com>
2016-06-09 6:02 ` [PATCH 2/2] selftests/powerpc: Test unaligned copy and paste Chris Smart
2016-06-09 7:26 ` Michael Neuling
2016-06-09 10:50 ` Michael Ellerman [this message]
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=1465469403.31662.7.camel@ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=chris@distroguy.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mikey@neuling.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).