* __switch_to test-and-branch ALTIVEC specific?
@ 2005-09-13 17:50 Marcelo Tosatti
2005-09-13 19:05 ` Kumar Gala
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2005-09-13 17:50 UTC (permalink / raw)
To: linuxppc-dev, linux-ppc-embedded
Hi,
This test&branch looks AltiVec specific, any reason for not #ifdef'ing it
out?
--- arch/ppc/kernel/process.c.orig 2005-09-13 14:43:13.000000000 -0300
+++ arch/ppc/kernel/process.c 2005-09-13 14:43:51.000000000 -0300
@@ -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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: __switch_to test-and-branch ALTIVEC specific?
2005-09-13 17:50 __switch_to test-and-branch ALTIVEC specific? Marcelo Tosatti
@ 2005-09-13 19:05 ` Kumar Gala
2005-09-13 20:35 ` Marcelo Tosatti
2005-09-18 1:31 ` Benjamin Herrenschmidt
2005-09-13 22:23 ` -dev and -embedded cross-posting Eugene Surovegin
2005-09-15 11:18 ` __switch_to test-and-branch ALTIVEC specific? Paul Mackerras
2 siblings, 2 replies; 9+ messages in thread
From: Kumar Gala @ 2005-09-13 19:05 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linuxppc-dev, linux-ppc-embedded
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
On Sep 13, 2005, at 12:50 PM, Marcelo Tosatti wrote:
> Hi,
>
> This test&branch looks AltiVec specific, any reason for not #ifdef'ing
> it
> out?
>
> --- arch/ppc/kernel/process.c.orig 2005-09-13 14:43:13.000000000
> -0300
> +++ arch/ppc/kernel/process.c 2005-09-13 14:43:51.000000000 -0300
> @@ -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
> Linuxppc-dev@ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: __switch_to test-and-branch ALTIVEC specific?
2005-09-13 19:05 ` Kumar Gala
@ 2005-09-13 20:35 ` Marcelo Tosatti
2005-09-13 21:43 ` Kumar Gala
2005-09-15 8:21 ` Segher Boessenkool
2005-09-18 1:31 ` Benjamin Herrenschmidt
1 sibling, 2 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2005-09-13 20:35 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, cort, linux-ppc-embedded
On Tue, Sep 13, 2005 at 02:05:57PM -0500, Kumar Gala wrote:
> 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) ?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: __switch_to test-and-branch ALTIVEC specific?
2005-09-13 20:35 ` Marcelo Tosatti
@ 2005-09-13 21:43 ` Kumar Gala
2005-09-18 1:31 ` Benjamin Herrenschmidt
2005-09-15 8:21 ` Segher Boessenkool
1 sibling, 1 reply; 9+ messages in thread
From: Kumar Gala @ 2005-09-13 21:43 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linuxppc-dev, cort, linux-ppc-embedded
On Sep 13, 2005, at 3:35 PM, Marcelo Tosatti wrote:
> On Tue, Sep 13, 2005 at 02:05:57PM -0500, Kumar Gala wrote:
>
>> 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) ?
That's probably better. Hopefully Ben will have some reason if what
you suggest is not sufficient.
- k
^ permalink raw reply [flat|nested] 9+ messages in thread
* -dev and -embedded cross-posting
2005-09-13 17:50 __switch_to test-and-branch ALTIVEC specific? Marcelo Tosatti
2005-09-13 19:05 ` Kumar Gala
@ 2005-09-13 22:23 ` Eugene Surovegin
2005-09-15 11:18 ` __switch_to test-and-branch ALTIVEC specific? Paul Mackerras
2 siblings, 0 replies; 9+ messages in thread
From: Eugene Surovegin @ 2005-09-13 22:23 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linux-ppc-embedded
Guys,
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.
--
Eugene
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: __switch_to test-and-branch ALTIVEC specific?
2005-09-13 20:35 ` Marcelo Tosatti
2005-09-13 21:43 ` Kumar Gala
@ 2005-09-15 8:21 ` Segher Boessenkool
1 sibling, 0 replies; 9+ messages in thread
From: Segher Boessenkool @ 2005-09-15 8:21 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linuxppc-dev, cort, linux-ppc-embedded
>> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: __switch_to test-and-branch ALTIVEC specific?
2005-09-13 17:50 __switch_to test-and-branch ALTIVEC specific? Marcelo Tosatti
2005-09-13 19:05 ` Kumar Gala
2005-09-13 22:23 ` -dev and -embedded cross-posting Eugene Surovegin
@ 2005-09-15 11:18 ` Paul Mackerras
2 siblings, 0 replies; 9+ messages in thread
From: Paul Mackerras @ 2005-09-15 11:18 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: linuxppc-dev, linux-ppc-embedded
Marcelo Tosatti writes:
> 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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: __switch_to test-and-branch ALTIVEC specific?
2005-09-13 19:05 ` Kumar Gala
2005-09-13 20:35 ` Marcelo Tosatti
@ 2005-09-18 1:31 ` Benjamin Herrenschmidt
1 sibling, 0 replies; 9+ messages in thread
From: Benjamin Herrenschmidt @ 2005-09-18 1:31 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, linux-ppc-embedded
On Tue, 2005-09-13 at 14:05 -0500, Kumar Gala wrote:
> 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.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: __switch_to test-and-branch ALTIVEC specific?
2005-09-13 21:43 ` Kumar Gala
@ 2005-09-18 1:31 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Herrenschmidt @ 2005-09-18 1:31 UTC (permalink / raw)
To: Kumar Gala; +Cc: linuxppc-dev, cort, linux-ppc-embedded
On Tue, 2005-09-13 at 16:43 -0500, Kumar Gala wrote:
> On Sep 13, 2005, at 3:35 PM, Marcelo Tosatti wrote:
>
> > On Tue, Sep 13, 2005 at 02:05:57PM -0500, Kumar Gala wrote:
> >
> >> 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) ?
>
> That's probably better. Hopefully Ben will have some reason if what
> you suggest is not sufficient.
Just #ifdef CONFIG_ALTIVEC is fine
Ben.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2005-09-18 1:31 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-13 17:50 __switch_to test-and-branch ALTIVEC specific? Marcelo Tosatti
2005-09-13 19:05 ` Kumar Gala
2005-09-13 20:35 ` Marcelo Tosatti
2005-09-13 21:43 ` Kumar Gala
2005-09-18 1:31 ` Benjamin Herrenschmidt
2005-09-15 8:21 ` Segher Boessenkool
2005-09-18 1:31 ` Benjamin Herrenschmidt
2005-09-13 22:23 ` -dev and -embedded cross-posting Eugene Surovegin
2005-09-15 11:18 ` __switch_to test-and-branch ALTIVEC specific? Paul Mackerras
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).