Re: 2.6.24-rc1-git15 Kernel build fails on powerpc - Unrecognized opcode: `dssall'

Previous thread: mm snapshot broken-out-2007-11-06-02-32.tar.gz uploaded by akpm on Tuesday, November 6, 2007 - 3:33 am. (51 messages)

Next thread: [PATCH] init: Introduce rootdir bootparm to select which dir to sys_chroot by Al Boldi on Tuesday, November 6, 2007 - 3:40 am. (7 messages)
From: Kamalesh Babulal
Date: Tuesday, November 6, 2007 - 3:34 am

Hi,

The build fails on the power6 machine while compiling 2.6.24-rc1-git15 kernel,
with randconfig,

  CHK     include/linux/compile.h
  AS      arch/powerpc/kernel/swsusp_32.o
arch/powerpc/kernel/swsusp_32.S: Assembler messages:
arch/powerpc/kernel/swsusp_32.S:138: Error: Unrecognized opcode: `dssall'
make[1]: *** [arch/powerpc/kernel/swsusp_32.o] Error 1
make: *** [arch/powerpc/kernel] Error 2

# cat /proc/cpuinfo
processor       : 0
cpu             : POWER6 (architected), altivec supported
clock           : 4198.000000MHz
revision        : 3.1 (pvr 003e 0301)

processor       : 1
cpu             : POWER6 (architected), altivec supported
clock           : 4198.000000MHz
revision        : 3.1 (pvr 003e 0301)

processor       : 2
cpu             : POWER6 (architected), altivec supported
clock           : 4198.000000MHz
revision        : 3.1 (pvr 003e 0301)

processor       : 3
cpu             : POWER6 (architected), altivec supported
clock           : 4198.000000MHz
revision        : 3.1 (pvr 003e 0301)

timebase        : 512000000
platform        : pSeries
machine         : CHRP IBM,8203-E4A

# gcc -v
Using built-in specs.
Target: ppc64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --enable-secureplt --with-long-double-128 --host=ppc64-redhat-linux --build=ppc64-redhat-linux --target=ppc64-redhat-linux --with-cpu=default32
Thread model: posix
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)

# ld -v
GNU ld version 2.17.50.0.6-5.el5 20061020


-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.
From: Balbir Singh
Date: Tuesday, November 6, 2007 - 3:46 am

Looks suspiciously like an altivec issue. Could you compile with make
V=1 and/or do a git bisect and see what broke?

Balbir
-

From: Johannes Berg
Date: Tuesday, November 6, 2007 - 3:54 am

Looks more like a toolchain issue to me.

johannes
From: David Miller
Date: Tuesday, November 6, 2007 - 4:10 am

From: Johannes Berg <johannes@sipsolutions.net>

Or, this is another instance of the "CFLAGS environment variable"
problem.

For a few days, the kbuild stuff would integrate any CFLAGS,
AFLAGS, etc. settings you might have set in your environment.
-

From: Kamalesh Babulal
Date: Tuesday, November 6, 2007 - 4:28 am

Hi Balbir,

The Build error of kernel compilation with V=1

make -f scripts/Makefile.build obj=arch/powerpc/kernel
make -f scripts/Makefile.build obj=arch/powerpc/kernel/vdso32
  gcc -m32 -Wp,-MD,arch/powerpc/kernel/.swsusp_32.o.d  -nostdinc -isystem /usr/lib/gcc/ppc64-redhat-linux/4.1.2/include -D__KERNEL__ -Iinclude  -include include/linux/autoconf.h -Iarch/powerpc -D__ASSEMBLY__ -Iarch/powerpc -Wa,-m405 -gdwarf-2     -c -o arch/powerpc/kernel/swsusp_32.o arch/powerpc/kernel/swsusp_32.S
arch/powerpc/kernel/swsusp_32.S: Assembler messages:
arch/powerpc/kernel/swsusp_32.S:138: Error: Unrecognized opcode: `dssall'
make[1]: *** [arch/powerpc/kernel/swsusp_32.o] Error 1
make: *** [arch/powerpc/kernel] Error 2

-- 
Thanks & Regards,
Kamalesh Babulal,
Linux Technology Center,
IBM, ISTL.
-

From: Balbir Singh
Date: Tuesday, November 6, 2007 - 6:39 am

I looked at your .config and now your  build. It looks like you select
CONFIG_4xx (I see -Wa,-m405) and compile swsusp_32.S. The
compiler/toolchain does not enable altivec instructions for CONFIG_4xx.
If CONFIG_HIBERNATION is enabled as in your case, it compiles
swsusp_32.S which assumes that ALTIVEC is enabled (see CPU_FTR_ALTIVEC).

You ideally need to have -Wa,-maltivec passed in your CFLAGS.

-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL
-

From: Andy Whitcroft
Date: Tuesday, November 6, 2007 - 8:44 am

So that sounds like a Kconfig problem then?  That HIBERATION requires
ALITIVEC and yet does not depend on it or set it.

-apw
-

From: Johannes Berg
Date: Wednesday, November 7, 2007 - 2:38 am

Yes. I'm guessing that it broke with Rafael's hibernation/suspend
Kconfig changes but will take a look. I think it used to depend on
powermac.

johannes
From: Johannes Berg
Date: Wednesday, November 7, 2007 - 5:49 am

Hmm, no, it didn't. I don't feel confident enough that nobody cares
about this code to make these Kconfig changes for 2.6.24.

johannes
From: Johannes Berg
Date: Wednesday, November 7, 2007 - 5:59 am

This makes the altivec code in swsusp_32.S depend on CONFIG_ALTIVEC to
avoid build failures for systems that don't have altivec. I'm not sure
whether the code will actually work for other systems, but it was merged
for just ppc32 rather than powermac a very long time ago.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
---

--- everything.orig/arch/powerpc/kernel/swsusp_32.S	2007-11-07 13:27:12.441517359 +0100
+++ everything/arch/powerpc/kernel/swsusp_32.S	2007-11-07 13:27:25.251519911 +0100
@@ -133,10 +133,12 @@ _GLOBAL(swsusp_arch_suspend)
 /* Resume code */
 _GLOBAL(swsusp_arch_resume)
 
+#ifdef CONFIG_ALTIVEC
 	/* Stop pending alitvec streams and memory accesses */
 BEGIN_FTR_SECTION
 	DSSALL
 END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+#endif
  	sync
 
 	/* Disable MSR:DR to make sure we don't take a TLB or


-

Previous thread: mm snapshot broken-out-2007-11-06-02-32.tar.gz uploaded by akpm on Tuesday, November 6, 2007 - 3:33 am. (51 messages)

Next thread: [PATCH] init: Introduce rootdir bootparm to select which dir to sys_chroot by Al Boldi on Tuesday, November 6, 2007 - 3:40 am. (7 messages)