Re: FP in kernelspace

From: Andi Kleen
Date: Sun Jul 30 2006 - 13:30:42 EST

Jiri Slaby <jirislaby@xxxxxxxxx> writes:

> I have a driver written for 2.4 + RT patches with FP support. I want
> it to work in 2.6. How to implement FP? Has anybody developped some
> "protocol" between KS and US yet? If not, could somebody point me, how
> to do it the best -- with low latency.
> The device doesn't generate irqs

Doesn't sound like something that should be supported for mainline

> So 2 questions are:
> 1) howto FP in kernel

You can use kernel_fpu_begin()/_end() around the FP code in the
kernel, but the real time people will probably hate you for it because
it disables preemption.

> 3) any way to have faster ticks (up to 5000Hz)?

There are plenty of interval timers in various hardware in a typical
system that can be used. e.g. RTC is a common choice. Drawback is
that you might conflict with other users, especially in user space.

But please don't try to submit such a hack.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at