timer_tick vs clockevent
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Jan 25 07:32:13 EST 2011
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.
More information about the linux-arm-kernel
mailing list