On Tue, 2006-06-27 at 18:03 +0530, Jinesh K J wrote: > > Does this mean that when context switch occurs, the kernel always stores > > the FPU registers and status even though the particular process does not > > do any floating point operation? > > > > see the link > > http://mail.nl.linux.org/kernelnewbies/2004-09/msg00401.html > > > But how does it relate to the "We should not use Floating -point > > operation in Kernel? Is it is simply a design issue to have much > > performance or we cannot do at all floating point operation in kernel > > itself? > > > > I think, if u want to use FPU inside the kernel, then u need to > manually save and restore the FPU state before each operation. If u r > using a pre-emptive kernel, the u need to disable pre-emption before > doing this. i found the following link from google. i hope it'll be > helpful. > > http://ozlabs.org/pipermail/linuxppc-embedded/2005-May/018302.html > > jinesh. never ever do this yourself, but use kernel_fpu_begin / _end api's for that.. but even then.. you can only really use integer MMX/SSE, not real FPU. (the exception case is a real nightmare since FPU exceptions are more or less asynchronous) -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/