All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomasz Figa <t.figa@samsung.com>
To: Chander Kashyap <k.chander@samsung.com>,
	Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	linaro-kernel@lists.linaro.org,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH V5 16/20] ARM: exynos: cpuidle: Move the power sequence call in the cpu_pm notifier
Date: Thu, 26 Jun 2014 11:48:24 +0200	[thread overview]
Message-ID: <53ABEC68.7060500@samsung.com> (raw)
In-Reply-To: <CADWw7Ojjk9U95-Sh3WfK+OuKBJk4_XAJgGNrNmt7gcaAjxwVKQ@mail.gmail.com>

Hi Chander,

On 26.06.2014 11:07, Chander Kashyap wrote:
> On Fri, Apr 11, 2014 at 4:10 PM, Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:

[snip]

>> @@ -359,6 +373,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
>>         switch (cmd) {
>>         case CPU_PM_ENTER:
>>                 if (cpu == 0) {
>> +                       exynos_pm_central_suspend();
>>                         exynos_cpu_save_register();
>>                 }
>>                 break;
>> @@ -368,6 +383,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
>>                         if (!soc_is_exynos5250())
>>                                 scu_enable(S5P_VA_SCU);
>>                         exynos_cpu_restore_register();
>> +                       exynos_pm_central_resume();
> 
> This notifier is called for system wide suspend and cpuidle.
> 
> In case of Exynos cpuidle only AFTR and LPA state need to program
> central_sequencer and store/restore the registers.
> 
> But in 5420 (core-power-down), this is not required, and causing the regression.
> 
> Hence need to remove this notifier, or need to find a way to
> differentiate the cpuidle state.

This patch is already present in v3.16. Moreover, Exynos5420 cpuidle has
not been merged yet. This means that this issue is not a regression and
I believe any further work on this should be carried out as further
patches on top of this change.

Anyway, this change has introduced a regression, though, but in another
area - it broke suspend, at least on Exynos4-based devices, because now
certain steps are performed twice. I've sent a patch for 3.16-rc3 to fix
this by dropping custom suspend-specific syscore ops, effectively moving
most of the handling to CPU PM notifier, which also matches requirements
of AFTR and lower power states. See [1].

[1]
http://www.mail-archive.com/linux-samsung-soc@vger.kernel.org/msg32935.html

However, in this case, moving back to suspend-specific syscore_ops and
simply duplicating some code for lower cpuidle states might be a better
option. Care to send a patch (fix for 3.16, replacing mine) or I should
do it?

Best regards,
Tomasz

WARNING: multiple messages have this Message-ID (diff)
From: t.figa@samsung.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V5 16/20] ARM: exynos: cpuidle: Move the power sequence call in the cpu_pm notifier
Date: Thu, 26 Jun 2014 11:48:24 +0200	[thread overview]
Message-ID: <53ABEC68.7060500@samsung.com> (raw)
In-Reply-To: <CADWw7Ojjk9U95-Sh3WfK+OuKBJk4_XAJgGNrNmt7gcaAjxwVKQ@mail.gmail.com>

Hi Chander,

On 26.06.2014 11:07, Chander Kashyap wrote:
> On Fri, Apr 11, 2014 at 4:10 PM, Daniel Lezcano
> <daniel.lezcano@linaro.org> wrote:

[snip]

>> @@ -359,6 +373,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
>>         switch (cmd) {
>>         case CPU_PM_ENTER:
>>                 if (cpu == 0) {
>> +                       exynos_pm_central_suspend();
>>                         exynos_cpu_save_register();
>>                 }
>>                 break;
>> @@ -368,6 +383,7 @@ static int exynos_cpu_pm_notifier(struct notifier_block *self,
>>                         if (!soc_is_exynos5250())
>>                                 scu_enable(S5P_VA_SCU);
>>                         exynos_cpu_restore_register();
>> +                       exynos_pm_central_resume();
> 
> This notifier is called for system wide suspend and cpuidle.
> 
> In case of Exynos cpuidle only AFTR and LPA state need to program
> central_sequencer and store/restore the registers.
> 
> But in 5420 (core-power-down), this is not required, and causing the regression.
> 
> Hence need to remove this notifier, or need to find a way to
> differentiate the cpuidle state.

This patch is already present in v3.16. Moreover, Exynos5420 cpuidle has
not been merged yet. This means that this issue is not a regression and
I believe any further work on this should be carried out as further
patches on top of this change.

Anyway, this change has introduced a regression, though, but in another
area - it broke suspend, at least on Exynos4-based devices, because now
certain steps are performed twice. I've sent a patch for 3.16-rc3 to fix
this by dropping custom suspend-specific syscore ops, effectively moving
most of the handling to CPU PM notifier, which also matches requirements
of AFTR and lower power states. See [1].

[1]
http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32935.html

However, in this case, moving back to suspend-specific syscore_ops and
simply duplicating some code for lower cpuidle states might be a better
option. Care to send a patch (fix for 3.16, replacing mine) or I should
do it?

Best regards,
Tomasz

  reply	other threads:[~2014-06-26  9:48 UTC|newest]

Thread overview: 96+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-11 10:39 [PATCH V5 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
2014-04-11 10:39 ` Daniel Lezcano
2014-04-11 10:39 ` [PATCH V5 01/20] ARM: EXYNOS: Move arm core power down clock to exynos5250 common clock Daniel Lezcano
2014-04-11 10:39   ` Daniel Lezcano
2014-04-11 10:39 ` [PATCH V5 02/20] ARM: exynos: cpuidle: Prevent forward declaration Daniel Lezcano
2014-04-11 10:39   ` Daniel Lezcano
2014-04-11 10:39 ` [PATCH V5 03/20] ARM: exynos: cpuidle: Use cpuidle_register Daniel Lezcano
2014-04-11 10:39   ` Daniel Lezcano
2014-04-11 10:39 ` [PATCH V5 04/20] ARM: exynos: cpuidle: Change function name prefix Daniel Lezcano
2014-04-11 10:39   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 05/20] ARM: exynos: cpuidle: Encapsulate register access inside a function Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 06/20] ARM: exynos: cpuidle: Move some code inside the idle_finisher Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 07/20] ARM: exynos: cpuidle: Fix S5P_WAKEUP_STAT call Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 08/20] ARM: exynos: cpuidle: Use the cpu_pm notifier Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 09/20] ARM: exynos: cpuidle: Move scu_enable in " Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 10/20] ARM: exynos: cpuidle: Remove ifdef for scu_enable Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 11/20] ARM: exynos: cpuidle: Pass wakeup mask parameter to function Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 12/20] ARM: exynos: cpuidle: Encapsulate boot vector code into a function Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 13/20] ARM: exynos: cpuidle: Disable cpuidle for 5440 Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 14/20] ARM: exynos: cpuidle: Encapsulate the AFTR code into a function Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 15/20] ARM: exynos: cpuidle: Move the AFTR state function into pm.c Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 16/20] ARM: exynos: cpuidle: Move the power sequence call in the cpu_pm notifier Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-06-26  9:07   ` Chander Kashyap
2014-06-26  9:07     ` Chander Kashyap
2014-06-26  9:48     ` Tomasz Figa [this message]
2014-06-26  9:48       ` Tomasz Figa
2014-06-27  5:56       ` Chander Kashyap
2014-06-27  5:56         ` Chander Kashyap
2014-04-11 10:40 ` [PATCH V5 17/20] ARM: exynos: cpuidle: Move S5P_CHECK_SLEEP into pm.c Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 18/20] ARM: exynos: cpuidle: Pass the AFTR callback to the platform_data Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-05-09 10:56   ` Arnd Bergmann
2014-05-09 10:56     ` Arnd Bergmann
2014-05-09 12:02     ` Tomasz Figa
2014-05-09 12:02       ` Tomasz Figa
2014-05-09 15:29       ` Bartlomiej Zolnierkiewicz
2014-05-09 15:29         ` Bartlomiej Zolnierkiewicz
2014-05-12 15:18       ` Daniel Lezcano
2014-05-12 15:18         ` Daniel Lezcano
2014-05-15 14:07         ` Tomasz Figa
2014-05-15 14:07           ` Tomasz Figa
2014-05-15 20:40           ` Kukjin Kim
2014-05-15 20:40             ` Kukjin Kim
2014-05-21  7:15             ` Daniel Lezcano
2014-05-21  7:15               ` Daniel Lezcano
2014-05-21  8:10               ` Arnd Bergmann
2014-05-21  8:10                 ` Arnd Bergmann
2014-05-21  9:02                 ` Daniel Lezcano
2014-05-21  9:02                   ` Daniel Lezcano
2014-05-21 14:56                   ` Arnd Bergmann
2014-05-21 14:56                     ` Arnd Bergmann
2014-05-21 13:54                 ` Kukjin Kim
2014-05-21 13:54                   ` Kukjin Kim
2014-05-09 13:10     ` Kukjin Kim
2014-05-09 13:10       ` Kukjin Kim
2014-04-11 10:40 ` [PATCH V5 19/20] ARM: exynos: cpuidle: Cleanup all unneeded headers from cpuidle.c Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-11 10:40 ` [PATCH V5 20/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle directory Daniel Lezcano
2014-04-11 10:40   ` Daniel Lezcano
2014-04-14  9:01 ` [PATCH V5 00/20] ARM: exynos: cpuidle: Move the driver to drivers/cpuidle Daniel Lezcano
2014-04-14  9:01   ` Daniel Lezcano
2014-04-24 17:02   ` Tomasz Figa
2014-04-24 17:02     ` Tomasz Figa
2014-04-26 11:05     ` Kukjin Kim
2014-04-26 11:05       ` Kukjin Kim
2014-05-22 18:35       ` Kukjin Kim
2014-05-22 18:35         ` Kukjin Kim
2014-05-22 18:57         ` Daniel Lezcano
2014-05-22 18:57           ` Daniel Lezcano
2014-05-23 15:32         ` Daniel Lezcano
2014-05-23 15:32           ` Daniel Lezcano
2014-05-23 21:31           ` Tomasz Figa
2014-05-23 21:31             ` Tomasz Figa
2014-05-24  4:57             ` Sachin Kamat
2014-05-24  4:57               ` Sachin Kamat
2014-05-24 17:24             ` [PATCH] ARM: exynos: Fix kernel panic when unplugging CPU1 on 4210 Daniel Lezcano
2014-05-24 17:24               ` Daniel Lezcano
2014-05-24 17:31               ` Daniel Lezcano
2014-05-24 17:31                 ` Daniel Lezcano
2014-05-25 19:51                 ` Kukjin Kim
2014-05-25 19:51                   ` Kukjin Kim
2014-05-24 17:32               ` Tomasz Figa
2014-05-24 17:32                 ` Tomasz Figa

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=53ABEC68.7060500@samsung.com \
    --to=t.figa@samsung.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=k.chander@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    /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.