* Altivec Vector code bug
@ 2004-04-06 20:19 John Whitney
2004-04-07 6:30 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 2+ messages in thread
From: John Whitney @ 2004-04-06 20:19 UTC (permalink / raw)
To: Linux/PPC Development
[-- Attachment #1: Type: text/plain, Size: 674 bytes --]
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
[-- Attachment #2: altivec.patch --]
[-- Type: application/octet-stream, Size: 466 bytes --]
--- linuxppc-2.6.5-rc2.orig/arch/ppc/kernel/head.S 2004-04-01 14:21:53.000000000 -0500
+++ linuxppc-2.6.5-rc2/arch/ppc/kernel/head.S 2004-04-06 16:12:12.000000000 -0400
@@ -493,13 +493,14 @@
* 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Altivec Vector code bug
2004-04-06 20:19 Altivec Vector code bug John Whitney
@ 2004-04-07 6:30 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Herrenschmidt @ 2004-04-07 6:30 UTC (permalink / raw)
To: John Whitney; +Cc: Linux/PPC Development
On Wed, 2004-04-07 at 06:19, John Whitney wrote:
> 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.
Thanks, forwarded upstream.
Ben.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-04-07 6:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-06 20:19 Altivec Vector code bug John Whitney
2004-04-07 6:30 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).