Save are floating point state in cpu_switch() if needed instead of relying
completely on lazy floating point state saving. This is needed for the SMP case since processes can migrate to other CPUs. Submitted by: dfr
This commit is contained in:
parent
2b77cdeac1
commit
5d52039847
@ -2131,7 +2131,7 @@ alpha_fpstate_save(struct proc *p, int write)
|
||||
critical_t s;
|
||||
|
||||
s = critical_enter();
|
||||
if (p == PCPU_GET(fpcurproc)) {
|
||||
if (p != NULL && p == PCPU_GET(fpcurproc)) {
|
||||
/*
|
||||
* If curproc != fpcurproc, then we need to enable FEN
|
||||
* so that we can dump the fp state.
|
||||
|
@ -140,6 +140,13 @@ Lcs1: LDGP(pv)
|
||||
cmpeq s0, s2, t0 /* oldproc == newproc? */
|
||||
bne t0, Lcs7 /* Yes! Skip! */
|
||||
|
||||
/*
|
||||
* Save fp state if we have some.
|
||||
*/
|
||||
mov s0, a0 /* curproc */
|
||||
ldiq a1, 1 /* clear fpcurproc */
|
||||
CALL(alpha_fpstate_save)
|
||||
|
||||
/*
|
||||
* Deactivate the old address space before activating the
|
||||
* new one. We need to do this before activating the
|
||||
|
Loading…
Reference in New Issue
Block a user