All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Tomasz Figa <t.figa@samsung.com>
Cc: Russell King <linux@arm.linux.org.uk>,
	Kukjin Kim <kgene.kim@samsung.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v3] ARM: exynos4: hotplug: Fix CPU idle clock down after CPU off
Date: Wed, 16 Jul 2014 15:25:50 +0200	[thread overview]
Message-ID: <1405517150.15590.2.camel@AMDC1943> (raw)
In-Reply-To: <53C678B5.7080304@samsung.com>

On śro, 2014-07-16 at 15:05 +0200, Tomasz Figa wrote:
> Hi Krzysztof,
> 
> On 16.07.2014 14:07, Krzysztof Kozlowski wrote:
> 
> [snip]
> 
> > +#ifdef CONFIG_SMP
> > +extern void exynos_clear_delayed_reset_assertion(u32 core_id);
> > +#endif
> 
> Is the ifdef really needed? The only difference it makes if the function
> is used but not compiled in is that with it the compilation will fail,
> while without it the kernel won't link.

Hmmm... I'll take another approach - just merge hotplug.c into
platsmp.c.

> 
> > +
> >  extern void exynos_cpu_resume(void);
> >  
> >  extern struct smp_operations exynos_smp_ops;
> 
> [snip]
> 
> > +/*
> > + * Clear the USE_DELAYED_RESET_ASSERTION option, set on Exynos4 SoCs
> > + * during hot-unplugging CPUx.
> > + *
> > + * It won't harm if this is called during first boot of secondary CPU.
> > + *
> > + * Exynos4 SoCs require setting USE_DELAYED_RESET_ASSERTION so the CPU idle
> > + * clock down feature could properly detect global idle state when
> > + * CPUx is off.
> > + */
> > +void exynos_clear_delayed_reset_assertion(u32 core_id)
> > +{
> > +	if (soc_is_exynos4()) {
> > +		unsigned int tmp;
> > +
> > +		tmp = __raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
> > +		tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
> > +		__raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
> > +	}
> > +}
> 
> The idea to make this a helper function is quite nice, but maybe it
> could be extended into exynos_set_delayed_reset_assertion() and disable
> or enable delayed assertion depending on another argument?

Sure, I'll change it.

Best regards,
Krzysztof

> 
> Best regards,
> Tomasz

WARNING: multiple messages have this Message-ID (diff)
From: k.kozlowski@samsung.com (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] ARM: exynos4: hotplug: Fix CPU idle clock down after CPU off
Date: Wed, 16 Jul 2014 15:25:50 +0200	[thread overview]
Message-ID: <1405517150.15590.2.camel@AMDC1943> (raw)
In-Reply-To: <53C678B5.7080304@samsung.com>

On ?ro, 2014-07-16 at 15:05 +0200, Tomasz Figa wrote:
> Hi Krzysztof,
> 
> On 16.07.2014 14:07, Krzysztof Kozlowski wrote:
> 
> [snip]
> 
> > +#ifdef CONFIG_SMP
> > +extern void exynos_clear_delayed_reset_assertion(u32 core_id);
> > +#endif
> 
> Is the ifdef really needed? The only difference it makes if the function
> is used but not compiled in is that with it the compilation will fail,
> while without it the kernel won't link.

Hmmm... I'll take another approach - just merge hotplug.c into
platsmp.c.

> 
> > +
> >  extern void exynos_cpu_resume(void);
> >  
> >  extern struct smp_operations exynos_smp_ops;
> 
> [snip]
> 
> > +/*
> > + * Clear the USE_DELAYED_RESET_ASSERTION option, set on Exynos4 SoCs
> > + * during hot-unplugging CPUx.
> > + *
> > + * It won't harm if this is called during first boot of secondary CPU.
> > + *
> > + * Exynos4 SoCs require setting USE_DELAYED_RESET_ASSERTION so the CPU idle
> > + * clock down feature could properly detect global idle state when
> > + * CPUx is off.
> > + */
> > +void exynos_clear_delayed_reset_assertion(u32 core_id)
> > +{
> > +	if (soc_is_exynos4()) {
> > +		unsigned int tmp;
> > +
> > +		tmp = __raw_readl(EXYNOS_ARM_CORE_OPTION(core_id));
> > +		tmp &= ~(S5P_USE_DELAYED_RESET_ASSERTION);
> > +		__raw_writel(tmp, EXYNOS_ARM_CORE_OPTION(core_id));
> > +	}
> > +}
> 
> The idea to make this a helper function is quite nice, but maybe it
> could be extended into exynos_set_delayed_reset_assertion() and disable
> or enable delayed assertion depending on another argument?

Sure, I'll change it.

Best regards,
Krzysztof

> 
> Best regards,
> Tomasz

  reply	other threads:[~2014-07-16 13:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16 12:07 [PATCH v3] ARM: exynos4: hotplug: Fix CPU idle clock down after CPU off Krzysztof Kozlowski
2014-07-16 12:07 ` Krzysztof Kozlowski
2014-07-16 13:05 ` Tomasz Figa
2014-07-16 13:05   ` Tomasz Figa
2014-07-16 13:25   ` Krzysztof Kozlowski [this message]
2014-07-16 13:25     ` Krzysztof Kozlowski

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=1405517150.15590.2.camel@AMDC1943 \
    --to=k.kozlowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=m.szyprowski@samsung.com \
    --cc=t.figa@samsung.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.