linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: timer_tick vs clockevent
Date: Tue, 25 Jan 2011 12:32:13 +0000	[thread overview]
Message-ID: <20110125123213.GI11507@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTikfhObABzCcq4gMYaTQ+i2UdVN-xS+XDWc8kZw2@mail.gmail.com>

On Tue, Jan 25, 2011 at 03:21:12PM +0300, Sergey Mironov wrote:
> Hi. I am working on porting linux to ARM 1176-based SoC. My quiestion
> is about system time. I see 2 ways of implementing it: 1) Define
> struct sys_timer variable and call timer_tick() from timer's interrupt
> handler 2) Use clocksource/clockevents. Looks like 2nd way is more
> elaborate, but what will I get if choose it?

For all new implementations, (2) is the way to go.  (1) is deprecated,
and involves some pretty hairy code for the gettimeoffset() stuff.

While (2) is more elaborate, you get additional features like NO_HZ
mode and hi-res timer support.  We recently had someone complaining that
they couldn't do something in userspace because their platform support
implemented (1) rather than (2), but I don't recall the details.

      reply	other threads:[~2011-01-25 12:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-25 12:21 timer_tick vs clockevent Sergey Mironov
2011-01-25 12:32 ` Russell King - ARM Linux [this message]

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=20110125123213.GI11507@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).