Thread (7 messages) flat view 7 messages, 7 authors, 2005-05-16

floating point in kernel (Re: insmod problem)

From: Roger Larsson <hidden>
Date: 2005-05-14 01:03:19

On Friday 13 May 2005 15.46, Kumar Gala wrote:
On May 13, 2005, at 8:14 AM, Mark Chambers wrote:
quoted
 > You're using floating arithmetic in the kernel.
 >
 > That's not supported.
 >
 > Regards
 >
 > Pantelis

Just for my edification:=A0 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=20
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:
=2D disable kernel preemption (YES)
=2D save previous value
=2D do your stuff
=2D restore
=2D enable preemption

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

/RogerL
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help