PPC floating point in the kernel?

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I am using a PPC 7455 and running Monta Vista Linux 2.6.  I have heard
that there are issues with using floating point in the kernel.  I have
hardware floating point support in the PPC 7455.  Should I use the
hardware floating point or should I use software floating point?
Thanks,

Andy


Re: PPC floating point in the kernel?

Quoted text here. Click to load it

No.

Longer answer:

Software FP: you need to add FP libraries to the kernel. Usually quite big
        and "slow"... Compared to integer/fixed point math.
Hardware FP: the kernel or you will need to keep track on FP registers all
        the time, since the kernel tries to be lazy about them
         - only save/restore when needed and only when in use.
         - Preemptive kernel? (Monta Vista) then you will need to disable/enable
           preemptions around the floating point code
                 - see linux/Documentation/preempt-locking.txt
                   "RULE #2: CPU state must be protected."
Any FP: Portability?

Summary: Don't use it if you find any way to avoid it.
         For what would you want to use it anyway?
         Interrupt driver with floating point?

/RogerL



Site Timeline