Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
PPC floating point in the kernel?
- 12-07-2004
- heynow567
December 7, 2004, 8:39 pm

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
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?

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
- » Minimal boot CD
- — Next thread in » Embedded Linux
-
- » I2C code for eeprom access
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Israel sees 60% drop in hospitalizations for age 60-plus 3 weeks after 1st shot
- — The site's Newest Thread. Posted in » Electronics Design
-
- » browser mischief
- — The site's Last Updated Thread. Posted in » Raspberry Pi Group
-