[PATCH 4/6] arm/imx6q: add smp and cpu hotplug support

Shilimkar, Santosh santosh.shilimkar at ti.com
Wed Sep 7 01:08:10 EDT 2011


On Wed, Sep 7, 2011 at 10:11 AM, Shawn Guo <shawn.guo at freescale.com> wrote:
> On Tue, Sep 06, 2011 at 08:53:07PM +0200, Arnd Bergmann wrote:
>> On Tuesday 06 September 2011 17:58:38 Shawn Guo wrote:
>> > It adds smp and cpu hotplug support for imx6q.
>> > +static u32 twd_saved_regs[4];
>> > +static int twd_irq;
>> > +
>> > +/*
>> > + * Resuming from ARM Dormant/Shutdown mode, the boot procedure will
>> > + * re-setup local timer for secondary cores.  For primary core, it
>> > + * has to take care of itself with the following pair of functions
>> > + * during suspend/resume.
>> > + */
>> > +void imx_local_timer_pre_suspend(void)
>> > +{
>> > +   twd_saved_regs[0] = __raw_readl(twd_base + TWD_TIMER_LOAD);
>> > +   twd_saved_regs[1] = __raw_readl(twd_base + TWD_TIMER_COUNTER);
>> > +   twd_saved_regs[2] = __raw_readl(twd_base + TWD_TIMER_CONTROL);
>> > +   twd_saved_regs[3] = __raw_readl(twd_base + TWD_TIMER_INTSTAT);
>> > +}
>> > +
>> > +void imx_local_timer_post_resume(void)
>> > +{
>> > +   __raw_writel(twd_saved_regs[0], twd_base + TWD_TIMER_LOAD);
>> > +   __raw_writel(twd_saved_regs[1], twd_base + TWD_TIMER_COUNTER);
>> > +   __raw_writel(twd_saved_regs[2], twd_base + TWD_TIMER_CONTROL);
>> > +   __raw_writel(twd_saved_regs[3], twd_base + TWD_TIMER_INTSTAT);
>> > +
>> > +   gic_enable_ppi(twd_irq);
>> > +}
>>
>> readl_relaxed()?
>>
> Ok.  You get the best judgement on this.
>
You don't have to save local timer registers any more. The local timer
is always re-configued and this is already handled in common kernel.

You can drop above change and test your patches. I am sure they will
still work.



More information about the linux-arm-kernel mailing list