[PATCH v2 00/15] Make SMP timers standalone

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Jan 5 06:01:11 EST 2012


On Thu, Jan 05, 2012 at 11:26:12AM +0100, Linus Walleij wrote:
> I think this looks like one big misunderstanding. I understood it as
> the SMP TWD block is synthesized also on UP silicon, i.e. same
> hardware, and so it will need to use the driver from
> arch/arm/kernel/smp_twd.c, however there is nothing local
> about that apart from being in close locality of the CPU.

Yes indeed.  The TWD code is architected to plug into the local timer
code via a set of well defined hooks.

It's entirely possible to call the TWD setup function with a non-local
timer clock event structure if you have a TWD which is a global timer.
The percpu stuff for storage will just work on UP systems, so that's
not a concern.  What could be is the percpu IRQ stuff, which presumably
wouldn't be available on non-SMP systems.

Apart from that, I think the current architecture is right - it separates
the hardware timer code from the local-timer specifics, and allows the
hardware timer driver to be re-used if needed.

Trying to make local timers as a general rule work as global timers is,
I think, a big mistake.  I've no problem with making a local timer hardware
_implementation_ work as a global timer though.



More information about the linux-arm-kernel mailing list