From: Thomas Gleixner <tglx@linutronix.de>
To: Francis Moreau <francis.moro@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: clockevent questions
Date: Sat, 12 May 2007 17:14:52 +0200 [thread overview]
Message-ID: <1178982892.22481.183.camel@localhost.localdomain> (raw)
In-Reply-To: <38b2ab8a0705120754l281f54eevd1e91e2f01fff6f2@mail.gmail.com>
Francis,
On Sat, 2007-05-12 at 16:54 +0200, Francis Moreau wrote:
> I'm trying to use clocksource and clockevent new subsystem. My
> platform has a timer that I'd like to use both as a clocksource and a
> clockevent devices.
See arch/i386/kernel/hpet.c
> This timer is continueous in sense that it can run
> without any interruption
-ENOPARSE
Has your timer a free running counter and a match register based event
mechanism ?
> so I assume I can flag the clocksource device
> with "CLOCK_SOURCE_IS_CONTINUOUS". However I noticed that clockevent
> device can be stopped by using "set_mode()" method. Are these two
> behaviours compatible ?
the clock event stop only stops the event mechanism, it does not stop
the counter.
See arch/i386/kernel/hpet.c
> Another question is that I have another embedded 16 bits timer that I
> would like to use. Since the timer is only 16 bits, the maximum
> interval is tiny, My question if a user ask for a clockevent device
> using an interval is bigger that 2^16, the clockevent system doesn't
> return an error. Instead it silently reduce the interval to 2^16. Is
> this correct ? if so why ?
Yes, it is correct. The generic timer code requests an event in the
future. It does not care, whether the hardware device can handle that or
not. So the clock event code limits the delta to the maximum delta the
device can handle. The interrupt fires and the generic timer code
reschedules the event with the remaining delta time.
tglx
next prev parent reply other threads:[~2007-05-12 15:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 14:54 clockevent questions Francis Moreau
2007-05-12 15:14 ` Thomas Gleixner [this message]
2007-05-12 20:13 ` Francis Moreau
2007-05-12 20:23 ` Thomas Gleixner
2007-05-13 5:52 ` Francis Moreau
2007-05-15 8:47 ` Francis Moreau
2007-05-15 22:10 ` Thomas Gleixner
2007-05-16 7:42 ` Francis Moreau
2007-05-16 8:00 ` Thomas Gleixner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1178982892.22481.183.camel@localhost.localdomain \
--to=tglx@linutronix.de \
--cc=francis.moro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox