Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jul 2010 12:00:12 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        Neel Natu <neelnatu@gmail.com>
Cc:        freebsd-mips@freebsd.org
Subject:   Re: [RFC] Event timers on MIPS
Message-ID:  <4C48089C.1010503@FreeBSD.org>
In-Reply-To: <AANLkTinvboQiT65Nc7901uwWKUNyaNh9HbX0yuFVGpnc@mail.gmail.com>
References:  <4C41A248.8090605@FreeBSD.org>	<4C4698D6.2090104@FreeBSD.org>	<AANLkTinrTzPZF0NbnT2e8kf8E4KtCwXUfFH7i1nBP_kz@mail.gmail.com>	<4C47D8CD.7020209@FreeBSD.org> <AANLkTinvboQiT65Nc7901uwWKUNyaNh9HbX0yuFVGpnc@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Neel Natu wrote:
> On Wed, Jul 21, 2010 at 10:36 PM, Alexander Motin <mav@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C48089C.1010503>