patch-2.1.97 linux/arch/ppc/kernel/align.c
Next file: linux/arch/ppc/kernel/chrp_pci.c
Previous file: linux/arch/ppc/kernel/Makefile
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Tue Apr 14 17:33:57 1998
- Orig file:
v2.1.96/linux/arch/ppc/kernel/align.c
- Orig date:
Thu Jul 31 13:09:17 1997
diff -u --recursive --new-file v2.1.96/linux/arch/ppc/kernel/align.c linux/arch/ppc/kernel/align.c
@@ -194,9 +194,13 @@
return -EFAULT; /* bad address */
}
+#ifdef __SMP__
+ if ((flags & F) && (regs->msr & MSR_FP) )
+ smp_giveup_fpu(current);
+#else
if ((flags & F) && last_task_used_math == current)
giveup_fpu();
-
+#endif
if (flags & M)
return 0; /* too hard for now */
@@ -255,12 +259,22 @@
* the kernel with -msoft-float so it doesn't use the
* fp regs for copying 8-byte objects. */
case LD+F+S:
+#ifdef __SMP__
+ if (regs->msr & MSR_FP )
+ smp_giveup_fpu(current);
+#else
giveup_fpu();
+#endif
cvt_fd(&data.f, ¤t->tss.fpr[reg]);
/* current->tss.fpr[reg] = data.f; */
break;
case ST+F+S:
+#ifdef __SMP__
+ if (regs->msr & MSR_FP )
+ smp_giveup_fpu(current);
+#else
giveup_fpu();
+#endif
cvt_df(¤t->tss.fpr[reg], &data.f);
/* data.f = current->tss.fpr[reg]; */
break;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov