[RFC][PATCH] powerpc/CoreNet64: compile with CONFIG_E{5,6}500_CPU well

Scott Wood scottwood at freescale.com
Thu Nov 21 09:03:16 EST 2013


On Wed, 2013-11-20 at 12:47 -0600, Kumar Gala wrote:
> On Nov 20, 2013, at 10:41 AM, Scott Wood <scottwood at freescale.com> wrote:
> 
> > On Wed, 2013-11-20 at 16:35 +0800, Tiejun Chen wrote:
> >> CONFIG_ALTIVEC is always enabled for CoreNet64.
> > 
> > In the defconfig perhaps, but this isn't a generally true statement.
> > 
> >> And if we select CONFIG_E{5,6}500_CPU this may introduce -mcpu=e500mc64
> >> into $CFLAGS. But Altivec and Spe options not allowed with
> >> e500mc64, so :
> > 
> > Sigh.
> > 
> >>  CC      arch/powerpc/lib/xor_vmx.o
> >> arch/powerpc/lib/xor_vmx.c:1:0: error: AltiVec not supported in this target
> >> make[1]: *** [arch/powerpc/lib/xor_vmx.o] Error 1
> >> make: *** [arch/powerpc/lib] Error 2
> >> 
> >> Signed-off-by: Tiejun Chen <tiejun.chen at windriver.com>
> >> ---
> >> arch/powerpc/lib/Makefile |    3 +++
> >> 1 file changed, 3 insertions(+)
> >> 
> >> diff --git a/arch/powerpc/lib/Makefile b/arch/powerpc/lib/Makefile
> >> index 95a20e1..641a77d 100644
> >> --- a/arch/powerpc/lib/Makefile
> >> +++ b/arch/powerpc/lib/Makefile
> >> @@ -40,5 +40,8 @@ obj-y			+= code-patching.o
> >> obj-y			+= feature-fixups.o
> >> obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o
> >> 
> >> +# Altivec and Spe options not allowed with e500mc64 in GCC.
> >> +ifeq ($(call cc-option-yn,-mcpu=e500mc64),n)
> >> obj-$(CONFIG_ALTIVEC)	+= xor_vmx.o
> >> CFLAGS_xor_vmx.o += -maltivec -mabi=altivec
> >> +endif
> > 
> > This does not seem like the right fix.  What if GCC supports both
> > -mcpu=e500mc64 and -mcpu=e6500, and we're using the latter?  Or for that
> > matter, if we're using -mcpu=whatever-ibm-chip-has-this?
> > 
> > Plus, wouldn't you need to do something to prevent code in that file
> > from being called?
> > 
> > -Scott
> 
> Why does -mcpu=e500mc64 get you spe enabled?  It shouldn’t as no e500mc or greater part has spe.  Can you try using -mno-spe -maltivec?

I don't think SPE is relevant.  The problem is that GCC refuses to allow
-maltivec to be combined with -mcpu=e500mc64.  -mno-spe doesn't make a
difference.

-Scott





More information about the Linuxppc-dev mailing list