diff options
author | John Baldwin <jhb@FreeBSD.org> | 2009-03-05 16:56:16 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2009-03-05 16:56:16 +0000 |
commit | a8346a9865366a822e5af1fa3d6cf5fbf241ba44 (patch) | |
tree | eb0c61351211605f31be2d4ab4e7160345e897cb /sys/amd64/amd64/trap.c | |
parent | 9edc34f864b39891bb071a62513d38f3118de862 (diff) | |
download | src-a8346a9865366a822e5af1fa3d6cf5fbf241ba44.tar.gz src-a8346a9865366a822e5af1fa3d6cf5fbf241ba44.zip |
A few cleanups to the FPU code on amd64:
- fpudna() always returned 1 since amd64 CPUs always have FPUs. Change
the function to return void and adjust the calling code in trap() to
assume the return 1 case is the only case.
- Remove fpu_cleanstate_ready as it is always true when it is tested.
Also, only initialize fpu_cleanstate when fpuinit() is called on the BSP.
Reviewed by: bde
Notes
Notes:
svn path=/head/; revision=189412
Diffstat (limited to 'sys/amd64/amd64/trap.c')
-rw-r--r-- | sys/amd64/amd64/trap.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index 8d710cd913c8..ccd6c39a861c 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -416,13 +416,8 @@ trap(struct trapframe *frame) case T_DNA: /* transparent fault (due to context switch "late") */ - if (fpudna()) - goto userout; - printf("pid %d killed due to lack of floating point\n", - p->p_pid); - i = SIGKILL; - ucode = 0; - break; + fpudna(); + goto userout; case T_FPOPFLT: /* FPU operand fetch fault */ ucode = ILL_COPROC; @@ -450,11 +445,9 @@ trap(struct trapframe *frame) * XXX this should be fatal unless the kernel has * registered such use. */ - if (fpudna()) { - printf("fpudna in kernel mode!\n"); - goto out; - } - break; + fpudna(); + printf("fpudna in kernel mode!\n"); + goto out; case T_STKFLT: /* stack fault */ break; |