[BUG] ameslab-2.4 missing altivec bits
Benjamin Herrenschmidt
benh at kernel.crashing.org
Wed Nov 26 17:32:55 EST 2003
Looks like we missed the sys_ppc32.c bits in 2.4:
Whoever takes care of that tree currently, please apply.
Ben.
===== arch/ppc64/kernel/sys_ppc32.c 1.14 vs edited =====
--- 1.14/arch/ppc64/kernel/sys_ppc32.c Wed Nov 26 03:50:06 2003
+++ edited/arch/ppc64/kernel/sys_ppc32.c Wed Nov 26 17:30:21 2003
@@ -4000,6 +4000,10 @@
goto out;
if (regs->msr & MSR_FP)
giveup_fpu(current);
+#ifdef CONFIG_ALTIVEC
+ if (regs->msr & MSR_VEC)
+ giveup_altivec(current);
+#endif /* CONFIG_ALTIVEC */
error = do_execve32(filename, (u32*) a1, (u32*) a2, regs);
@@ -4023,8 +4027,16 @@
#ifndef CONFIG_SMP
if (last_task_used_math == current)
last_task_used_math = 0;
+ if (last_task_used_altivec == current)
+ last_task_used_altivec = 0;
#endif
+ memset(current->thread.fpr, 0, sizeof(current->thread.fpr));
current->thread.fpscr = 0;
+#ifdef CONFIG_ALTIVEC
+ memset(¤t->thread.vr[0], 0,offsetof(struct thread_struct,vrsave[2])-
+ offsetof(struct thread_struct,vr[0]));
+ current->thread.vscr.u[3] = 0x00010000; /* Java mode disabled */
+#endif /* CONFIG_ALTIVEC */
}
extern asmlinkage int sys_prctl(int option, unsigned long arg2, unsigned long arg3,
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list