summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2004-02-11 07:19:15 +0000
committergrehan <grehan@FreeBSD.org>2004-02-11 07:19:15 +0000
commit2f334f4f85ed68c71028b7ae416fec6a71dd2f3c (patch)
treee8577c85320c4be34c77c3ce1029edd354a2609c /sys
parent39cf5870aa0708c9abeb54bd01f4ae1654c68923 (diff)
downloadFreeBSD-src-2f334f4f85ed68c71028b7ae416fec6a71dd2f3c.zip
FreeBSD-src-2f334f4f85ed68c71028b7ae416fec6a71dd2f3c.tar.gz
Invalide pcb's fpu cpu # by setting it to INT_MAX, not NULL.
Diffstat (limited to 'sys')
-rw-r--r--sys/powerpc/powerpc/fpu.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/sys/powerpc/powerpc/fpu.c b/sys/powerpc/powerpc/fpu.c
index d4c588a..21492af 100644
--- a/sys/powerpc/powerpc/fpu.c
+++ b/sys/powerpc/powerpc/fpu.c
@@ -37,6 +37,7 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <sys/proc.h>
#include <sys/systm.h>
+#include <sys/limits.h>
#include <sys/user.h>
#include <machine/fpu.h>
@@ -53,11 +54,11 @@ enable_fpu(struct thread *td)
tf = trapframe(td);
/*
- * Save the thread's FPU CPU number, and set the CPU's current
+ * Save the thread's FPU CPU number, and set the CPU's current
* FPU thread
*/
td->td_pcb->pcb_fpcpu = PCPU_GET(cpuid);
- PCPU_SET(fputhread, td);
+ PCPU_SET(fputhread, td);
/*
* Enable the FPU for when the thread returns from the exception.
@@ -110,7 +111,7 @@ save_fpu(struct thread *td)
struct pcb *pcb;
pcb = td->td_pcb;
-
+
/*
* Temporarily re-enable floating-point during the save
*/
@@ -144,7 +145,7 @@ save_fpu(struct thread *td)
* Clear the current fp thread and pcb's CPU id
* XXX should this be left clear to allow lazy save/restore ?
*/
- pcb->pcb_fpcpu = NULL;
+ pcb->pcb_fpcpu = INT_MAX;
PCPU_SET(fputhread, NULL);
}
OpenPOWER on IntegriCloud