From: Scott Wood <scottwood@freescale•com>
To: Udma Catalin-Dan-B32721 <B32721@freescale•com>
Cc: Wood Scott-B07421 <B07421@freescale•com>,
"linuxppc-dev@lists•ozlabs.org" <linuxppc-dev@lists•ozlabs.org>
Subject: Re: [PATCH] Update compilation flags with core specific options
Date: Wed, 24 Jul 2013 12:45:36 -0500 [thread overview]
Message-ID: <1374687936.15592.55@snotra> (raw)
In-Reply-To: <FE751157F0442848A159F3AB4CB1F55B3F83F1@039-SN1MPN1-001.039d.mgd.msft.net> (from B32721@freescale.com on Wed Jul 24 11:25:52 2013)
On 07/24/2013 11:25:52 AM, Udma Catalin-Dan-B32721 wrote:
> > This breaks the vdso for e500v1/v2 (userspace dies with SIGILL), =20
> since
> > KBUILD_CFLAGS doesn't get used when building asm files, and the vdso
> > uses mftbu/mftbl which are not being assembled to the form that
> > e500v1/v2 support.
> >
> > We should be setting -mcpu=3Dwhatever and -msoft-float in both CFLAGS =20
> and
> > AFLAGS, since we don't call "as" directly, and target selection =20
> should
> > not differ based on whether we're building a C file or an asm file.
> >
> > -Scott
> [CU] Thank you, Scott. I'll update also AFLAGS.
>=20
> I have some questions about how you reproduce the SIGILL issue.
> I tried to reproduce the issue looking to gettimeofday.S, that uses
> mftbu/mftbl. In my tests, I obtained the same output when compiling =20
> this file
> for p1021rdb before and after this patch, and also after adding -mcpu =20
> to
> AFLAGS: "objdump -d arch/powerpc/kernel/vdso32/gettimeofday.o" looks =20
> the same
> for the cases mentioned above:
> "mftbu r3" from .S file is decoded to "mfspr r3,269" in "objdump =20
> -d" output
>=20
> Indeed, for -mcpu=3D601/power3, the "objdump -d" output is "mftbu r3" =20
> and according to
> powerISA this instruction would cause Illegal Instruction error =20
> handler to be invoked
> and permits the sw to emulate the instruction.
It probably depends on what the default is for your toolchain.
-Scott=
prev parent reply other threads:[~2013-07-24 17:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-02 11:20 [PATCH] Update compilation flags with core specific options Catalin Udma
2013-07-09 23:48 ` Scott Wood
2013-07-24 0:11 ` Scott Wood
2013-07-24 16:25 ` Udma Catalin-Dan-B32721
2013-07-24 17:45 ` Scott Wood [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=1374687936.15592.55@snotra \
--to=scottwood@freescale$(echo .)com \
--cc=B07421@freescale$(echo .)com \
--cc=B32721@freescale$(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