From 2f334f4f85ed68c71028b7ae416fec6a71dd2f3c Mon Sep 17 00:00:00 2001 From: grehan Date: Wed, 11 Feb 2004 07:19:15 +0000 Subject: Invalide pcb's fpu cpu # by setting it to INT_MAX, not NULL. --- sys/powerpc/powerpc/fpu.c | 9 +++++---- 1 file 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 #include #include +#include #include #include @@ -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); } -- cgit v1.1