[etherlab-dev] ARM port
fp at igh-essen.com
Wed Jan 30 22:29:39 CET 2008
On Wed, Jan 30, 2008 at 03:18:22PM +0100, Florian Pose wrote:
> This was a question, I was asking myself a lot of times. I still found
> no answer. I think the best solution would be, to ban the TSC
> calculations from the code, I'll have a look, if this is possible
> without breaking the functionality.
I searched for the uses of get_cycles() and cpu_khz. Most of them are
timeout calculations > 1 ms, the IO-timeout is currently 500 µs.
I think, that even the latter one can be savely replaced with a
calculation based on jiffies, even with the HZ variable set to 250 Hz,
resulting in a worst-case timeout of 4 ms * 2 = 8 ms.
Anyway, I'm thinking of a timeout calculation macro to support the
high-resolution timers in the future. I hope, they soon will be
available on all platforms.
BTW, there is the do_gettimeofday() kernel function providing a more
generic approach, but unfortunately it can't be called in realtime
context, as I had to experience...
More information about the etherlab-dev