Thread (17 messages) flat view 17 messages, 4 authors, 2007-03-08

RE: [patch][5/5] powerpc V2: Add the general support for Embedded Floating-Point instructions

From: Zhu Ebony-r57400 <hidden>
Date: 2007-02-09 06:27:25

=20
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]=20
Sent: Friday, February 09, 2007 2:04 PM
To: Zhu Ebony-r57400
Cc: paulus@samba.org; linuxppc-dev@ozlabs.org
Subject: Re: [patch][5/5] powerpc V2: Add the general support=20
for Embedded Floating-Point instructions
=20
=20
On Feb 8, 2007, at 11:48 PM, Zhu Ebony-r57400 wrote:
=20
quoted
quoted
-----Original Message-----
From: Kumar Gala [mailto:galak@kernel.crashing.org]
Sent: Friday, February 09, 2007 1:29 PM
To: Zhu Ebony-r57400
Cc: paulus@samba.org; linuxppc-dev@ozlabs.org
Subject: Re: [patch][5/5] powerpc V2: Add the general support for=20
Embedded Floating-Point instructions


On Feb 8, 2007, at 11:15 PM, Zhu Ebony-r57400 wrote:
quoted
quoted
quoted
quoted
quoted
diff --git a/arch/powerpc/kernel/head_fsl_booke.S
b/arch/powerpc/
quoted
quoted
quoted
quoted
quoted
kernel/head_fsl_booke.S index 66877bd..0d05db0 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -705,7 +705,7 @@ #else
 #endif /* CONFIG_SPE */

 	/* SPE Floating Point Round */
-	EXCEPTION(0x2050, SPEFloatingPointRound,
unknown_exception,
quoted
quoted
quoted
quoted
quoted
EXC_XFER_EE)
+	EXCEPTION(0x2050, SPEFloatingPointRound,
SPEFloatingPointException_Round, EXC_XFER_EE)

 	/* Performance Monitor */
 	EXCEPTION(0x2060, PerformanceMonitor,=20
performance_monitor_exception, EXC_XFER_STD) @@=20
-840,6 +840,8 @@
quoted
quoted
quoted
quoted
quoted
quoted
quoted
load_up_spe:
 	oris	r5,r5,MSR_SPE@h
 	mtmsr	r5			/* enable use
of SPE now */
quoted
quoted
quoted
quoted
quoted
 	isync
+	li	r5,(SPEFSCR_FINVE | SPEFSCR_FDBZE |
SPEFSCR_FUNFE |
quoted
quoted
quoted
quoted
quoted
SPEFSCR_FOVFE)
+	mtspr   SPRN_SPEFSCR,r5
We should do this via INIT_THREAD, is there a reason that
you want to
quoted
quoted
set these always?
I just thought it's the first time that an SPE instruction is=20
encountered, so I enable the exceptions here.
Lets do this via INIT_THREAD instead, its cleaner. (just
remember to
quoted
quoted
add the proper ifdef protection for SPE_IEEE
Talking about INIT_THREAD, I'm wondering where is the=20
best place to=20
quoted
quoted
quoted
enble the exceptions? Please advice!
What's the issue with enabling via INIT_THREAD?  am I missing=20
something?
Do you mean that add
".spefscr =3D SPEFSCR_FINV| =
SPEFSCR_FDBZE|SPEFSCR_FUNFE|SPEFSCR_FOVFE"
quoted
In the defination of INIT_THREAD?
=20
You may want to have something like #define=20
SPE_EXCEPTION_ENABLE (SPEFSCR_FINV|=20
SPEFSCR_FDBZE|SPEFSCR_FUNFE|SPEFSCR_FOVFE)
=20
Yep, with the proper #ifdef CONFIG_ protection.
OK, I got your point.

B.R.
Ebony
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help