From: Chris Smart <chris@distroguy•com>
To: Balbir Singh <bsingharora@gmail•com>
Cc: linuxppc-dev@lists•ozlabs.org
Subject: Re: [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste
Date: Mon, 20 Jun 2016 09:48:24 +1000 [thread overview]
Message-ID: <20160619234823.GA27442@distroguy.com> (raw)
In-Reply-To: <13e8530c-80d6-5475-f4f2-3a46e4a75a76@gmail.com>
On Fri, Jun 17, 2016 at 05:20:05PM +1000, Balbir Singh wrote:
>
>
>On 17/06/16 09:33, Chris Smart wrote:
[snip]
>> +
>> + /*
>> + * ISA 3.0 (such as P9) copy, copy_first, paste and paste_last alignment
>> + * check.
>> + *
>> + * Send a SIGBUS to the process that caused the fault.
>> + *
>> + * We do not emulate these because paste may contain additional metadata
>> + * when pasting to a co-processor. Furthermore, paste_last is the
>> + * synchronisation point for preceding copy/paste sequences.
>> + */
>> + if ((instruction & 0xfc0006fe) == PPC_INST_COPY)
>> + return -EIO;
>
>Should this all be under cpu_has_feature(CPU_FTR_ARCH_300)?
>
I'm not sure we should or not. That instruction only exists on those
machines so is it worth adding an additional check when the next check
will fail anyway?
I guess it would reduce non ISA 3.0 machines to just a single check rather
than two, but increases ISO 3.0 machines to three.
I defer to the wisdom of others.
-c
next prev parent reply other threads:[~2016-06-19 23:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-16 23:33 [Patch v2 1/2] powerpc: Send SIGBUS on unaligned copy and paste Chris Smart
2016-06-17 4:04 ` Segher Boessenkool
2016-06-21 0:39 ` Chris Smart
2016-06-17 7:20 ` Balbir Singh
2016-06-19 23:48 ` Chris Smart [this message]
2016-06-20 3:06 ` Balbir Singh
2016-07-05 14:10 ` [v2,1/2] " 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=20160619234823.GA27442@distroguy.com \
--to=chris@distroguy$(echo .)com \
--cc=bsingharora@gmail$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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