[RFC] Event timers on MIPS
Alexander Motin
mav at FreeBSD.org
Thu Jul 22 09:01:26 UTC 2010
Neel Natu wrote:
> On Wed, Jul 21, 2010 at 10:36 PM, Alexander Motin <mav at freebsd.org> wrote:
>> New patch: http://people.freebsd.org/~mav/timers_mips3.patch
>
> In clock_intr() it would seem that the last 'et_event_cb()' should be
> called conditionally only if (cycles_per_tick > 0). Of course, this is
> necessary only if my explanation about spurious clock_intr()
> invocations is correct.
cycles_per_tick == 0 except spurious interrupt may also mean one-shot
timer operation mode. In such case callback should be called on
interrupt, but timer should be stopped after that. To protect from
counter still running after stop (if needed) - probably we need one more
variable, or define some specific cycles_per_tick value.
I am not actually sure if writing 0xffffffff stops timer. I've just seen
it somewhere else. What is the proper way there to really stop the timer
to avoid spurious interrupt?
> I have tested the latest patch on the Sibyte as well and it works correctly.
Thanks.
--
Alexander Motin
More information about the freebsd-mips
mailing list