[uClinux-dev] Timer bug in all m68knommu architectures

Michael Leslie mleslie at arcturusnetworks.com
Tue Mar 18 11:24:17 EST 2003

On Tue, 18 Mar 2003, Paul McGougan wrote:
> I've come across a timer bug that I believe affects at least all m68knommu
> architectures, although I have only experimentally proven it on the 5272.

Mr. McGougan,

Neat fix. I've come across the same problem but I assume much worse.
I assume that I can miss jiffy interrupts for more reasons than just the
gettime; interrupt disables are all over the kernel. I also assume I can
miss more than one at a time (I've seen three to five in
quick experiments, under heavy interrupt load). The technique I'm
currently working on is roughly this: I run a second timer at a lower
resolution (10x) in free-run mode, which is restarted by the jiffy
ISR. When I run coldfire_tick(), I simply check my low-res counter to see
how many jiffy interrupts I have missed, and set missed_jiffies for
correction upstream.

I could post bits and pieces if you think they would be helpful. I'll
hold off submitting a complete patch for now because I've applied the
nanotime patch against an older kernel, which reaches far and wide all
over the kernel.

But the missed_jiffies correction code could be used separately, I

Michael Leslie
<mleslie at arcturusnetworks.com>

More information about the uClinux-dev mailing list