__switch_to test-and-branch ALTIVEC specific?

Kumar Gala kumar.gala at freescale.com
Wed Sep 14 05:05:57 EST 2005


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 at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev
>




More information about the Linuxppc-dev mailing list