[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: broken src/sys/arch/x86/isa/clock.c (i8254_get_timecount)
On Wed, Jan 16, 2008 at 08:52:54AM +0100, Frank Kardel wrote:
> Hi !
> > To fix the problem, I was thinking one could either ignore i8254_ticked
> > like we used to:
> > if (rtclock_tval && count < i8254_lastcount)
> > or alternately, maybe change the "||" to an "&&" (assuming that the
> > interrupt will run before the counter wraps more than once?).
> > if (rtclock_tval && (count < i8254_lastcount && !i8254_ticked))
> > either way makes auich_calibrate() work properly once again! any
> > suggestions on what to go with?
> I'd go for the second one as it is needed to suppress the ..._offset update
> from the clock interrupt code. If it would not be there, the wrap would
> be detected and ..._offset would be incremented in ...get_timecount AND
> in the clock interrupt code - this would result in a clock running
> sometimes fast.
OK, makes sense. I did that simple one in HEAD and I'll put in for some
sort of pullup to netbsd-4.
Joerg has sent me a more involved patch that fixes this and cleans it up
a bit which he may commit later?
Main Index |
Thread Index |