kernel - Fix floating point save state structure and minor npx issues
authorMatthew Dillon <dillon@apollo.backplane.com>
Thu, 22 Dec 2011 19:21:41 +0000 (11:21 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Thu, 22 Dec 2011 19:21:41 +0000 (11:21 -0800)
commit9e6e869e8ae3b41257bc4cb2ef8565828e90ea41
treeef2b38cdfd5d4bb499ceafedae5c3b8cc3ef7087
parent90ec01758b35be9a782bc6ea5c5b48aa6fac7e0d
kernel - Fix floating point save state structure and minor npx issues

* The floating point save structure(s) used by the kernel and possibly
  also userland were too large for x86-64 due to a porting error where
  'long' variables were left intact that should have been turned into
  32-bit variables.

  No known adverse effect to the too-large structures but we have to get
  it right.

* npxexit() was not being called in a kernel thread exit case.  Kernel
  threads do not use the FP unit so the case was never hit, but fix it
  anyway.

* Move a critical section to cover a flags test to handle a very rare
  preemptive thread switch issue.  Since the preempting thread is a
  kernel thread which does not use the FP unit this case was never hit,
  but fix it anyway.
sys/cpu/x86_64/include/npx.h
sys/platform/pc32/i386/vm_machdep.c
sys/platform/pc64/x86_64/npx.c
sys/platform/pc64/x86_64/vm_machdep.c
sys/platform/vkernel/i386/vm_machdep.c
sys/platform/vkernel64/x86_64/vm_machdep.c