On Friday 13 May 2005 15.46, Kumar Gala wrote:
> On May 13, 2005, at 8:14 AM, Mark Chambers wrote:
> >  > You're using floating arithmetic in the kernel.
> >  >
> >  > That's not supported.
> >  >
> >  > Regards
> >  >
> >  > Pantelis
> >
> > Just for my edification:? Is floating point itself not supported
> > (floating
> >  point register
> >  corruption or something like that) or just linking to user space
> > libraries?
>
> Use of floating point registers and instructions.  Its possible to use
> FP in rare cases inside the kernel buts its extremely discouraged.
>

The kernel is doing lazy saving of FP registers, only saving for user 
processes that uses them.  And especially avoiding to save for every
interrupt!

So if you like to use any FP (registers) in kernel you have to:
- disable kernel preemption (YES)
- save previous value
- do your stuff
- restore
- enable preemption

I remember a preemption bug caused by using MMX/SSE to copy
memory uncached.

/RogerL

Reply via email to