FP save/restore code in ppc32/ppc64 kernels
Paul Mackerras
paulus at au1.ibm.com
Mon Aug 12 12:38:44 EST 2002
Peter Bergner writes:
> But isn't the problem of the trap/interrupt/exception leaking into
> another process only a problem when we are doing lazy save of the
> FP regs? Since our ppc64 kernels are compiled as SMP, we don't do
> lazy save and the giveup_fpu() code would seem to force the pending
> FP exceptions to complete before the "mffs" in giveup_fpu finishes.
But the exception bits would be set in the FPSCR, waiting until we set
FE0/1 non-zero.
> It might be a good idea to clear the fpscr after saving it out to
> the thread struct though...
Exactly. We don't. If we did then we could do as you say and it
would work on SMP. We could do that as long as we are sure we won't
ever want to do a UP kernel on ppc64...
Regards,
Paul.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev
mailing list