__switch_to test-and-branch ALTIVEC specific?
Hi,
This test&branch looks AltiVec specific, any reason for not #ifdef'ing it out?
ppc/kernel/process.c 2005-09-13 14:43:51.000000000 -0300 renamed from ppc/kernel/process.c.orig 2005-09-13 14:43:13.000000000 -0300 +2 -0
@@ -287,11 +287,13 @@ struct task_struct *__switch_to(struct t #endif /* CONFIG_SPE */ #endif /* CONFIG_SMP */ +#ifdef CONFIG_ALTIVEC /* Avoid the trap. On smp this this never happens since * we don't set last_task_used_altivec -- Cort */ if (new->thread.regs && last_task_used_altivec == new) new->thread.regs->msr |= MSR_VEC; +#endif #ifdef CONFIG_SPE /* Avoid the trap. On smp this this never happens since * we don't set last_task_used_spe
This probably has to due with what happens on a G4 system with a kernel not build with Altivec.. However, I dont remember exactly what behavior is desired.
- kumar
Quoted 29 lines · Marcelo Tosatti
Hi,
This test&branch looks AltiVec specific, any reason for not #ifdef'ing it
out?---
arch/ppc/kernel/process.c.orig2005-09-13 14:43:13.000000000
-0300
+++arch/ppc/kernel/process.c2005-09-13 14:43:51.000000000 -0300ppc/kernel/process.c 2005-09-13 14:43:51.000000000 -0300 renamed from ppc/kernel/process.c.orig 2005-09-13 14:43:13.000000000 -0300 +2
-0@@ -287,11 +287,13 @@ struct task_struct *__switch_to(struct t #endif /* CONFIG_SPE */ #endif /* CONFIG_SMP */ +#ifdef CONFIG_ALTIVEC /* Avoid the trap. On smp this this never happens since * we don't set last_task_used_altivec -- Cort */ if (new->thread.regs && last_task_used_altivec == new) new->thread.regs->msr |= MSR_VEC; +#endif #ifdef CONFIG_SPE /* Avoid the trap. On smp this this never happens since * we don't set last_task_used_spe_______________________________________________
Linuxppc-dev mailing list
[email protected]
https://ozlabs.org/mailman/listinfo/linuxppc-dev
Quoted 3 lines · Kumar Gala
This probably has to due with what happens on a G4 system with a kernel not build with Altivec.. However, I dont remember exactly what behavior is desired.
What would be the appropriate set of definitions to use, then ?
#if defined (CONFIG_ALTIVEC || CONFIG_6xx) ?
Quoted 7 lines · Marcelo Tosatti
Quoted 3 lines · Kumar Gala
This probably has to due with what happens on a G4 system with a kernel not build with Altivec.. However, I dont remember exactly what
Quoted 6 lines
Quoted 2 lines
behavior is desired.
What would be the appropriate set of definitions to use, then ?
#if defined (
CONFIG_ALTIVEC||CONFIG_6xx) ?
That's probably better. Hopefully Ben will have some reason if what you suggest is not sufficient.
- k
Quoted 12 lines · Kumar Gala
Quoted 10 lines · Marcelo Tosatti
Quoted 7 lines · Kumar Gala
This probably has to due with what happens on a G4 system with a kernel not build with Altivec.. However, I dont remember exactly what
behavior is desired.
Quoted 6 lines
Quoted 3 lines
What would be the appropriate set of definitions to use, then ?
#if defined (
CONFIG_ALTIVEC||CONFIG_6xx) ?That's probably better. Hopefully Ben will have some reason if what you suggest is not sufficient.
Just #ifdef CONFIG_ALTIVEC is fine
Ben.
Quoted 3 lines
Quoted 3 lines
This probably has to due with what happens on a G4 system with a kernel not build with Altivec.. However, I dont remember exactly what behavior is desired.
A kernel not build with AltiVec support will just
SIGILL any user process that tries to use it (and
MSR[VEC] = 0).
The code here can safely be #ifdef'ed out (but note I only looked at the code, I didn't test it ;-) )
Segher
Quoted 3 lines · Kumar Gala
This probably has to due with what happens on a G4 system with a kernel not build with Altivec.. However, I dont remember exactly what behavior is desired.
No, we should never set MSR_VEC on a kernel not built with CONFIG_ALTIVEC.
Ben.
-dev and -embedded cross-posting
In reply to Marcelo TosattiGuys,
let's not cross-post -dev posts here. In general, -embedded isn't a totally separate list, it just covers embedded specific stuff, which is not interesting to several loud -dev readers :). Things which aren't embedded specific should go -dev.
I think, everybody *interested* in general PPC32 development issues here, are also subscribed to -dev list.
Thanks.
Signature · 1 line
Eugene
Quoted 2 lines · Marcelo Tosatti
This test&branch looks AltiVec specific, any reason for not #ifdef'ing it out?
No, your patch looks fine. (/me wishes patchwork had a "Queued" state.)
Paul.