> This breaks the vdso for e500v1/v2 (userspace dies with SIGILL), 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=whatever and -msoft-float in both CFLAGS and > AFLAGS, since we don't call "as" directly, and target selection 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.
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 this file for p1021rdb before and after this patch, and also after adding -mcpu to AFLAGS: "objdump -d arch/powerpc/kernel/vdso32/gettimeofday.o" looks the same for the cases mentioned above: "mftbu r3" from .S file is decoded to "mfspr r3,269" in "objdump -d" output Indeed, for -mcpu=601/power3, the "objdump -d" output is "mftbu r3" and according to powerISA this instruction would cause Illegal Instruction error handler to be invoked and permits the sw to emulate the instruction. Regards, Catalin _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev