Update of /cvsroot/linux-mips/linux/arch/mips/kernel
In directory usw-pr-cvs1:/tmp/cvs-serv24711/arch/mips/kernel
Modified Files:
process.c signal.c
Added Files:
ptrace.c
Log Message:
Don't set CU1 bit if we don't have an FPU. Some b0rken silicon doesn't like it at all.
Index: process.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/process.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- process.c 2001/10/19 21:19:38 1.4
+++ process.c 2001/10/31 17:28:54 1.5
@@ -56,8 +56,8 @@
void exit_thread(void)
{
/* Forget lazy fpu state */
- if (last_task_used_math == current) {
- set_cp0_status(ST0_CU1);
+ if (last_task_used_math == current && mips_cpu.options & MIPS_CPU_FPU) {
+ __enable_fpu();
__asm__ __volatile__("cfc1\t$0,$31");
last_task_used_math = NULL;
}
@@ -66,8 +66,8 @@
void flush_thread(void)
{
/* Forget lazy fpu state */
- if (last_task_used_math == current) {
- set_cp0_status(ST0_CU1);
+ if (last_task_used_math == current && mips_cpu.options & MIPS_CPU_FPU) {
+ __enable_fpu();
__asm__ __volatile__("cfc1\t$0,$31");
last_task_used_math = NULL;
}
@@ -85,7 +85,7 @@
if (last_task_used_math == current)
if (mips_cpu.options & MIPS_CPU_FPU) {
- set_cp0_status(ST0_CU1);
+ __enable_fpu();
save_fp(p);
}
/* set up new TSS. */
Index: signal.c
===================================================================
RCS file: /cvsroot/linux-mips/linux/arch/mips/kernel/signal.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- signal.c 2001/10/19 21:19:38 1.2
+++ signal.c 2001/10/31 17:28:54 1.3
@@ -22,6 +22,7 @@
#include <asm/asm.h>
#include <asm/bitops.h>
+#include <asm/cpu.h>
#include <asm/pgalloc.h>
#include <asm/stackframe.h>
#include <asm/uaccess.h>
@@ -355,7 +356,7 @@
err |= __put_user(owned_fp, &sc->sc_ownedfp);
if (current->used_math) { /* fp is active. */
- set_cp0_status(ST0_CU1);
+ enable_fpu();
err |= save_fp_context(sc);
last_task_used_math = NULL;
regs->cp0_status &= ~ST0_CU1;
|