All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: David Laight <David.Laight@ACULAB.COM>
Cc: Yang James-RA8135 <RA8135@freescale.com>, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] [RFC] Emulate "lwsync" to run standard user land on e500 cores
Date: Fri, 25 Oct 2013 14:02:45 +0100	[thread overview]
Message-ID: <1382706165.9395.63.camel@pasglop> (raw)
In-Reply-To: <AE90C24D6B3A694183C094C60CF0A2F6026B73B1@saturn3.aculab.com>

On Fri, 2013-10-25 at 10:58 +0100, David Laight wrote:
> > This is not a distro issue. It's a libstdc++ portability issue. libstdc++
> > hardcodes lwsync unless __NO_LWSYNC__ is explicitly defined,
> > which you only get with -mcpu=8540/-mcpu=8548.  When compiled
> > for any powerpc target other than -mcpu=8540/-mcpu=8548, including
> > the default -mcpu=common,  libstdc++ will end up containing lwsync.
> > There is no way to explicitly request libstdc++ to be built without lwsync
> > with an -mcpu target other than 8540/8548.
> > 
> > The issue is easily demonstrated by running a program that throws a
> > C++ exception: __cxa_throw() is called, which has an lwsync.  This
> > results in an illegal instruction exception when run on an e500v1/e500v2.
> 
> Perhaps libstc++ should be working out at run time whether lwsync is valid?

Do we have enough coats of paint on this bike shed yet ? :-)

I'm personally tempted to take Scott's approach since that's what we do
for other things as well, it just works and is simple.

Cheers,
Ben.

  reply	other threads:[~2013-10-25 13:03 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
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 [this message]
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=1382706165.9395.63.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=RA8135@freescale.com \
    --cc=linuxppc-dev@lists.ozlabs.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.