From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Kumar Gala <galak@kernel.crashing.org>
Cc: Scott Wood <scottwood@freescale.com>,
linuxppc-dev@lists.ozlabs.org, Wolfgang Denk <wd@denx.de>
Subject: Re: [PATCH] [RFC] Emulate "lwsync" to run standard user land on e500 cores
Date: Thu, 24 Oct 2013 10:45:19 +0100 [thread overview]
Message-ID: <1382607919.9395.56.camel@pasglop> (raw)
In-Reply-To: <BE5B0245-4ED1-4E3F-ADB1-F6A70C8FE3E1@kernel.crashing.org>
On Wed, 2013-10-23 at 23:06 -0500, Kumar Gala wrote:
> On Oct 23, 2013, at 5:15 AM, Scott Wood wrote:
>
> > On Wed, 2013-10-23 at 00:07 -0500, Kumar Gala wrote:
> >> On Oct 18, 2013, at 2:38 AM, Wolfgang Denk wrote:
> >>> diff --git a/arch/powerpc/kernel/traps.c b/arch/powerpc/kernel/traps.c
> >>> index f783c93..f330374 100644
> >>> --- a/arch/powerpc/kernel/traps.c
> >>> +++ b/arch/powerpc/kernel/traps.c
> >>> @@ -986,6 +986,13 @@ static int emulate_instruction(struct pt_regs *regs)
> >>> return 0;
> >>> }
> >>>
> >>> + /* Emulating the lwsync insn as a sync insn */
> >>> + if (instword == PPC_INST_LWSYNC) {
> >>> + PPC_WARN_EMULATED(lwsync, regs);
> >>> + asm volatile("sync" : : : "memory");
> >>
> >> Do we really need the inline asm? Doesn't the fact of just taking an exception and returning from it equate to a sync.
> >
> > No, it doesn't equate to a sync. See the discussion here:
> > http://patchwork.ozlabs.org/patch/256747/
> >
>
> Thanks.
>
> I'm not sure I'm a fan of doing this as it silently hides a significant performance impact.
>
> Could we possible re-write the userspace instruction to be a 'sync' when we hit this?
Rewriting user space is a can of worms I wouldn't get into ... is any
other arch doing it ?
I'm not too worried as long as we warn and account them.
Cheers,
Ben.
next prev parent reply other threads:[~2013-10-24 9:45 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-18 7:38 [PATCH] [RFC] Emulate "lwsync" to run standard user land on e500 cores Wolfgang Denk
2013-10-18 16:38 ` Scott Wood
2013-10-18 18:50 ` Wolfgang Denk
2013-10-23 5:07 ` Kumar Gala
2013-10-23 10:15 ` Scott Wood
2013-10-24 4:06 ` Kumar Gala
2013-10-24 9:45 ` Benjamin Herrenschmidt [this message]
2013-10-24 9:55 ` Kumar Gala
2013-10-24 21:05 ` James Yang
2013-10-25 4:12 ` Kumar Gala
2013-10-25 4:49 ` Yang James-RA8135
2013-10-25 9:58 ` David Laight
2013-10-25 13:02 ` Benjamin Herrenschmidt
2013-10-26 7:26 ` Kumar Gala
2013-10-25 15:13 ` James Yang
2013-10-25 10:36 ` Scott Wood
2013-10-25 15:25 ` James Yang
2013-10-28 17:52 ` Scott Wood
2013-10-27 10:29 ` Wolfgang Denk
2013-10-27 10:25 ` Wolfgang Denk
2013-10-24 10:18 ` David Laight
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=1382607919.9395.56.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=galak@kernel.crashing.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=scottwood@freescale.com \
--cc=wd@denx.de \
/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).