[parisc-linux] [PATCH] timer_interrupt and gettimeoffset.

Grant Grundler grundler at parisc-linux.org
Mon Sep 4 15:21:39 MDT 2006


On Mon, Sep 04, 2006 at 12:57:25PM -0400, John David Anglin wrote:
> There needs to be a check to ensure that the code has enough time
> to set cr16 with the new compare time before the counter passes this
> value.  If it misses, the counter will wrap.  This probably doesn't
> need to be a full half tick if it's desireable to avoid negative
> offsets.

Yes - I agree. I think this is the last bug in my code.
I'll just "skip" one tick in that case.
My guess is we'll never need more than a 0x1000 cycles
to read CR16, calculate the new "next_tick" and write CR16.

I picked 0x1000 because it very easy to test for: "if (x >> 12)...".

I'll review the your patch and see if I missed anything else
and then post version #4 (or #5?). Lost count.

grant




More information about the parisc-linux mailing list