Thread (5 messages) 5 messages, 3 authors, 2013-07-24

Re: [PATCH] Update compilation flags with core specific options

From: Scott Wood <hidden>
Date: 2013-07-24 17:45:50

On 07/24/2013 11:25:52 AM, Udma Catalin-Dan-B32721 wrote:
quoted
This breaks the vdso for e500v1/v2 (userspace dies with SIGILL), =20
since
quoted
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
quoted
AFLAGS, since we don't call "as" directly, and target selection =20
should
quoted
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=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help