[PATCH v2 00/15] Make SMP timers standalone

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Jan 5 07:10:26 EST 2012


On Thu, Jan 05, 2012 at 11:35:56AM +0000, Marc Zyngier wrote:
> On 05/01/12 11:26, Russell King - ARM Linux wrote:
> > Look, local timers *are* special.  They're not the same as global timers.
> > They're treated differently.  Ripping out the local timer setup stuff
> > from the SMP code is not the right solution, especially when we've
> > already got a separation of the local timer core from the hardware
> > implementation.
> 
> OK. I'll try to work out something different.

Why?  What's wrong with the existing structure?

If you want to use the TWD as a global timer, that's easy to do:

static struct clock_event_device twd_global_ce = {
	.irq = whatever_irq,
	.cpumask = cpu_mask_all,
};

static int __init twd_global_timer(void)
{
	twd_base = ioremap(twd_phys, SZ_4K);
	if (!twd_base)
		return -ENOMEM;
	twd_timer_setup(&twd_global_ce);
	return 0;
}

And no need to mess around with the local timer structure in
arch/arm/kernel/smp.c.



More information about the linux-arm-kernel mailing list