From: Benjamin Herrenschmidt <benh@kernel.crashing.org>

Without this patch, executing an altivec instruction on an altivec capable
CPU with a kernel that do not have CONFIG_ALTIVEC set would result in a
kernel crash.

(Fix forward ported from 2.4 by John Whitney
<jwhitney-linuxppc@sands-edge.com>)


---

 25-akpm/arch/ppc/kernel/head.S |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff -puN arch/ppc/kernel/head.S~ppc32-altivec-exception-fix arch/ppc/kernel/head.S
--- 25/arch/ppc/kernel/head.S~ppc32-altivec-exception-fix	2004-04-06 23:37:01.834691320 -0700
+++ 25-akpm/arch/ppc/kernel/head.S	2004-04-06 23:37:01.839690560 -0700
@@ -493,13 +493,14 @@ SystemCall:
  * We effectively remap it to 0x3000.
  */
 	. = 0xf00
-
-#ifdef CONFIG_ALTIVEC
 	b	Trap_0f
+
 	. = 0xf20
+#ifdef CONFIG_ALTIVEC
 	b	AltiVecUnavailable
-Trap_0f:
 #endif
+
+Trap_0f:
 	EXCEPTION_PROLOG
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 	EXC_XFER_EE(0xf00, UnknownException)

_