Re: floating point support

From: Clive Dove (chdove_at_rogers.com)
Date: 09/13/03


Date: Fri, 12 Sep 2003 23:29:07 GMT

Wiseguy wrote:

> On the wall of the virtual bathroom stall, hagit_guy@hotmail.com
> (Hagit) scratches:
>> noone@celeron.local (Wiseguy) wrote in message
>> news:<3f5c2aa3_2@127.0.0.1>...
>>> On the wall of the virtual bathroom stall, hagit_guy@hotmail.com
>>> (Hagit) scratches: Could you elaborate on this "lack of proper
>>> floating point support?"
>>
>> as I understood, I am not allowed using floating point in kernel. I
>> have written a module which have a double variable. I succeded to
>> compile it, but when I have inserted the module, the message
>>:"floating point used in kernel (task=... pc=...)" appeared. I must
>> use the double type. do you know how can I deal that problem? (p.s -
>> I am not using any floating point register. the compiler does the
>> floating emulation).
>
> Ah...now I understand...
>
> First question: Are you really certain that you need to use the FPU
> in
> your driver? I am having a hard time envisioning any driver math that
> would require an FPU for reasonable performance.
>
> I can only think of two reasons why module programming would not allow
> the
> use of the FPU. 1) since not all platforms support an FPU it would
> make
> the kernel source less generic. and 2) simple laziness on the part of
> kernel developers who don't want to deal with handling of floating
> point exceptions/interrupts
>
> Only suggestion I have is to go to the linux kernel development site
> and sign up on the kernel developers mail list, then post your
> question there. The esoteric nature of kernel programming and FPU is
> probably a bit beyond this group.

OT, but how about BCD arithmatic? I want to convert a mortgage am jig
from OS/2 and BCD is more appropriate than floating point for money
calculations.



Relevant Pages

  • Re: floating point support
    ... I am not allowed using floating point in kernel. ... would require an FPU for reasonable performance. ... sign up on the kernel developers mail list, ...
    (comp.os.linux.hardware)
  • Re: unresoved symbol _gp_disp
    ... NO FLOATING POINT in the kernel PERIOD. ... save the FP context explicitely and disable preemption. ... designed to support userspace. ...
    (Linux-Kernel)
  • Re: floating point support
    ... I am not allowed using floating point in kernel. ... Do you mean "I turned on FPU ... I think Hagit is going for development speed over raw performance. ...
    (comp.os.linux.hardware)
  • Re: Using math.h in driver
    ... but there is rarely a good reason to use a floating point value. ... Windows 2k/XP/2k3 Filesystem and Driver Consulting ... > a ceilfunction in kernel? ... >> Don Burn (MVP, Windows DDK) ...
    (microsoft.public.win32.programmer.kernel)
  • Re: floating point emulation in 2.6 driver module
    ... restrictions on what the floating point can do. ... Without reading i387 datasheets, I can't tell you what guarantees that produces. ... gcc will then work "happily". ... > To all intents and purposes, there is no floating point in the kernel - ...
    (comp.os.linux.development.system)