Altivec Vector code bug

John Whitney jwhitney-linuxppc at sands-edge.com
Wed Apr 7 06:19:44 EST 2004


The attached patch corrects the following problem with the Altivec
vector:

When running Linux 2.6.5-rc2 (Altivec NOT configured in) on a 7410-base
platform, and running a program that attempts to use a vector register,
the kernel will lock up.  This is due to vectoring to 0xf20, which is
in the middle of the exception prolog as the exception handler is now
written.

To correct this, I reverted to the method used by the 2.4.25 kernel
(arch/ppc/kernel/head.S):

	. = 0xf00
	b Trap_0f

	. = 0xf20
#ifdef CONFIG_ALTIVEC
	b AltiVecUnavailable
#endif
Trap_0f:
	<exception handling code>

This causes the kernel to not lock up, regardless of the altivec
configuration.

John

-------------- next part --------------
A non-text attachment was scrubbed...
Name: altivec.patch
Type: application/octet-stream
Size: 466 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20040406/a686e81b/attachment.obj>


More information about the Linuxppc-dev mailing list