On 12/12/06, jimmy liu <[EMAIL PROTECTED]> wrote: > I am writing a module which need be integrated to the > linux kernel with floating point operations for > mpc82xx. The kernel does not provide support for > floating point operations. Does anybody have good idea > to implement it or make it to work around?
The official answer is: "Don't do that." :) Here's the more generous reply: The kernel explicitly does not support floating point in the kernel. Save/restore on floating point registers is expensive. In fact, IIRC, floating point registers for user space use 'lazy save/restore'; ie. the registers are not saved on every context switch; they are only saved if another user space process tries to perform FP operations. To support FP access in kernel space means you must fit your code into the already complex FP save/restore state machine; or you need to disable all interrupts and perform your own FP register save/restore within the context of your driver. And it's a pretty safe bet that you'll have trouble getting the driver into mainline. Why do you need kernel space FP? -- Grant Likely, B.Sc. P.Eng. Secret Lab Technologies Ltd. [EMAIL PROTECTED] (403) 399-0195 _______________________________________________ Linuxppc-embedded mailing list Linuxppc-embedded@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-embedded