From: Abhilash Kesavan <kesavan.abhilash@gmail.com> To: Nicolas Pitre <nicolas.pitre@linaro.org> Cc: linux-samsung-soc <linux-samsung-soc@vger.kernel.org>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org>, Kukjin Kim <kgene.kim@samsung.com>, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>, Andrew Bresticker <abrestic@chromium.org>, Douglas Anderson <dianders@chromium.org> Subject: Re: [PATCH v2] ARM: EXYNOS: Use MCPM call-backs to support S2R on Exynos5420 Date: Tue, 1 Jul 2014 18:44:49 +0530 [thread overview] Message-ID: <CAM4voama9omO4=x2+GaQesLQOh+5U2q8FQSe4+VwA0_4pOukkg@mail.gmail.com> (raw) In-Reply-To: <alpine.LFD.2.11.1407010012150.16842@knanqh.ubzr> Hi Nicolas, On Tue, Jul 1, 2014 at 9:49 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote: > On Mon, 30 Jun 2014, Abhilash Kesavan wrote: > >> Use the MCPM layer to handle core suspend/resume on Exynos5420. >> Also, restore the entry address setup code post-resume. >> >> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> >> --- > [...] > > Could you tell me more about this? > >> @@ -150,7 +153,13 @@ static void exynos_power_down(void) >> BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP); >> cpu_use_count[cpu][cluster]--; >> if (cpu_use_count[cpu][cluster] == 0) { >> - exynos_cpu_power_down(cpunr); >> + /* >> + * Bypass power down for CPU0 during suspend. This is being >> + * taken care by the SYS_PWR_CFG bit in CORE0_SYS_PWR_REG. >> + */ >> + if ((cpunr != 0) || >> + (__raw_readl(pmu_base_addr + S5P_INFORM1) != S5P_CHECK_SLEEP)) >> + exynos_cpu_power_down(cpunr); > > What happens if CPU0 is the first in the cluster to be idled? Will it > remain powered up until all the others have gone idle too? This check is only for handling the S2R CPU0 case. In case of idle/switching the S5P_CHECK_SLEEP flag would not be set and hence there would be no change in behavior for them. During suspend, we enable the ARM_USE_STANDBY_WFI0 bit which tells the PMU when the CPU0 is ready to be suspended. This in conjunction with the sleep state core configuration (setting SYS_PWR_REG low) causes the CPU0 to go down. We should not write to the CPU0 power configuration register (exynos_cpu_power_down) along with this during suspend. Regards, Abhilash > > > Nicolas
WARNING: multiple messages have this Message-ID (diff)
From: kesavan.abhilash@gmail.com (Abhilash Kesavan) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2] ARM: EXYNOS: Use MCPM call-backs to support S2R on Exynos5420 Date: Tue, 1 Jul 2014 18:44:49 +0530 [thread overview] Message-ID: <CAM4voama9omO4=x2+GaQesLQOh+5U2q8FQSe4+VwA0_4pOukkg@mail.gmail.com> (raw) In-Reply-To: <alpine.LFD.2.11.1407010012150.16842@knanqh.ubzr> Hi Nicolas, On Tue, Jul 1, 2014 at 9:49 AM, Nicolas Pitre <nicolas.pitre@linaro.org> wrote: > On Mon, 30 Jun 2014, Abhilash Kesavan wrote: > >> Use the MCPM layer to handle core suspend/resume on Exynos5420. >> Also, restore the entry address setup code post-resume. >> >> Signed-off-by: Abhilash Kesavan <a.kesavan@samsung.com> >> --- > [...] > > Could you tell me more about this? > >> @@ -150,7 +153,13 @@ static void exynos_power_down(void) >> BUG_ON(__mcpm_cluster_state(cluster) != CLUSTER_UP); >> cpu_use_count[cpu][cluster]--; >> if (cpu_use_count[cpu][cluster] == 0) { >> - exynos_cpu_power_down(cpunr); >> + /* >> + * Bypass power down for CPU0 during suspend. This is being >> + * taken care by the SYS_PWR_CFG bit in CORE0_SYS_PWR_REG. >> + */ >> + if ((cpunr != 0) || >> + (__raw_readl(pmu_base_addr + S5P_INFORM1) != S5P_CHECK_SLEEP)) >> + exynos_cpu_power_down(cpunr); > > What happens if CPU0 is the first in the cluster to be idled? Will it > remain powered up until all the others have gone idle too? This check is only for handling the S2R CPU0 case. In case of idle/switching the S5P_CHECK_SLEEP flag would not be set and hence there would be no change in behavior for them. During suspend, we enable the ARM_USE_STANDBY_WFI0 bit which tells the PMU when the CPU0 is ready to be suspended. This in conjunction with the sleep state core configuration (setting SYS_PWR_REG low) causes the CPU0 to go down. We should not write to the CPU0 power configuration register (exynos_cpu_power_down) along with this during suspend. Regards, Abhilash > > > Nicolas
next prev parent reply other threads:[~2014-07-01 13:14 UTC|newest] Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top 2014-06-26 10:58 [PATCH] ARM: EXYNOS: Restore the entry address setup code post-resume Abhilash Kesavan 2014-06-26 10:58 ` Abhilash Kesavan 2014-06-26 12:25 ` Abhilash Kesavan 2014-06-26 12:25 ` Abhilash Kesavan 2014-06-26 14:35 ` Lorenzo Pieralisi 2014-06-26 14:35 ` Lorenzo Pieralisi 2014-06-26 14:53 ` Lorenzo Pieralisi 2014-06-26 14:53 ` Lorenzo Pieralisi 2014-06-26 20:06 ` Nicolas Pitre 2014-06-26 20:06 ` Nicolas Pitre 2014-06-27 1:49 ` Abhilash Kesavan 2014-06-27 1:49 ` Abhilash Kesavan 2014-06-30 18:28 ` [PATCH v2] ARM: EXYNOS: Use MCPM call-backs to support S2R on Exynos5420 Abhilash Kesavan 2014-06-30 18:28 ` Abhilash Kesavan 2014-07-01 4:19 ` Nicolas Pitre 2014-07-01 4:19 ` Nicolas Pitre 2014-07-01 13:14 ` Abhilash Kesavan [this message] 2014-07-01 13:14 ` Abhilash Kesavan 2014-07-01 13:50 ` Lorenzo Pieralisi 2014-07-01 13:50 ` Lorenzo Pieralisi 2014-07-01 20:02 ` Nicolas Pitre 2014-07-01 20:02 ` Nicolas Pitre 2014-07-02 14:59 ` [RFC PATCH v3] " Abhilash Kesavan 2014-07-02 14:59 ` Abhilash Kesavan 2014-07-03 5:02 ` [RFC PATCH v4] " Abhilash Kesavan 2014-07-03 5:02 ` Abhilash Kesavan 2014-07-03 13:29 ` Nicolas Pitre 2014-07-03 13:29 ` Nicolas Pitre 2014-07-03 14:46 ` Abhilash Kesavan 2014-07-03 14:46 ` Abhilash Kesavan 2014-07-03 14:46 ` [PATCH v5] " Abhilash Kesavan 2014-07-03 14:46 ` Abhilash Kesavan 2014-07-03 15:45 ` several messages Nicolas Pitre 2014-07-03 15:45 ` Nicolas Pitre 2014-07-03 16:19 ` Abhilash Kesavan 2014-07-03 16:19 ` Abhilash Kesavan 2014-07-03 19:00 ` Nicolas Pitre 2014-07-03 19:00 ` Nicolas Pitre 2014-07-03 20:00 ` Abhilash Kesavan 2014-07-03 20:00 ` Abhilash Kesavan 2014-07-04 4:13 ` Nicolas Pitre 2014-07-04 4:13 ` Nicolas Pitre 2014-07-04 17:45 ` Abhilash Kesavan 2014-07-04 17:45 ` Abhilash Kesavan 2014-07-04 17:47 ` [PATCH v6] ARM: EXYNOS: Use MCPM call-backs to support S2R on Exynos5420 Abhilash Kesavan 2014-07-04 17:47 ` Abhilash Kesavan 2014-07-04 19:45 ` [PATCH v7] " Abhilash Kesavan 2014-07-04 19:45 ` Abhilash Kesavan 2014-07-04 21:00 ` Nicolas Pitre 2014-07-04 21:00 ` Nicolas Pitre 2014-07-04 21:21 ` Abhilash Kesavan 2014-07-04 21:21 ` Abhilash Kesavan 2014-07-08 10:53 ` Lorenzo Pieralisi 2014-07-08 10:53 ` Lorenzo Pieralisi 2014-07-08 13:39 ` Abhilash Kesavan 2014-07-08 13:39 ` Abhilash Kesavan 2014-07-08 15:19 ` Lorenzo Pieralisi 2014-07-08 15:19 ` Lorenzo Pieralisi
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='CAM4voama9omO4=x2+GaQesLQOh+5U2q8FQSe4+VwA0_4pOukkg@mail.gmail.com' \ --to=kesavan.abhilash@gmail.com \ --cc=abrestic@chromium.org \ --cc=dianders@chromium.org \ --cc=kgene.kim@samsung.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-samsung-soc@vger.kernel.org \ --cc=lorenzo.pieralisi@arm.com \ --cc=nicolas.pitre@linaro.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: linkBe 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.