linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: k.kozlowski@samsung.com (Krzysztof Kozlowski)
To: linux-arm-kernel@lists.infradead.org
Subject: [RESEND PATCH v2] ARM: exynos4: hotplug: Fix CPU idle clock down after CPU off
Date: Wed, 16 Jul 2014 13:19:10 +0200	[thread overview]
Message-ID: <1405509550.7368.0.camel@AMDC1943> (raw)
In-Reply-To: <53C65890.8000500@samsung.com>




On ?ro, 2014-07-16 at 12:48 +0200, Tomasz Figa wrote:
> Hi Krzysztof,
> 
> Please see my comment below.
> 
> On 16.07.2014 10:23, Krzysztof Kozlowski wrote:
> > On Exynos4 USE_DELAYED_RESET_ASSERTION must be set in
> > ARM_COREx_OPTION register during CPU power down. This is the proper way
> > of powering down CPU on Exynos4.
> > 
> > Additionally on Exynos4212 without this the CPU clock down feature won't
> > work after powering down some CPU and the online CPUs will work at full
> > frequency chosen by CPUfreq governor.
> > 
> > Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> 
> [snip]
> 
> > @@ -36,6 +36,14 @@ static inline void cpu_leave_lowpower(void)
> >  	  : "=&r" (v)
> >  	  : "Ir" (CR_C), "Ir" (0x40)
> >  	  : "cc");
> > +
> > +	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));
> > +	}
> 
> This code is executed only if the CPU doesn't manage to power off before
> already receiving a wake-up event. Otherwise the context is lost after
> wfi(), as the core power is being cut down.
> 
> The normal wake-up path goes through platsmp's exynos_boot_secondary()
> and I believe that setting of S5P_USE_DELAYED_RESET_ASSERTION should be
> taken care there as well.

You're right. Thanks for pointing this, I'll fix it.

Best regards,
Krzysztof
> 
> Best regards,
> Tomasz

      reply	other threads:[~2014-07-16 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-16  8:23 [RESEND PATCH v2] ARM: exynos4: hotplug: Fix CPU idle clock down after CPU off Krzysztof Kozlowski
2014-07-16 10:48 ` Tomasz Figa
2014-07-16 11:19   ` Krzysztof Kozlowski [this message]

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=1405509550.7368.0.camel@AMDC1943 \
    --to=k.kozlowski@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).