Hi,
This patch series adds support for AFTR idle mode on boards with
secure firmware enabled and allows EXYNOS cpuidle driver usage on
Exynos4x12 SoCs.
It has been tested on Trats2 board (using Exynos4412 SoC with secure
firmware enabled) on which AFTR mode reduces power consumption by ~12%
when EXYNOS cpuidle driver is enabled (in both cases the default
exynos_defconfig config is used and CPU1-3 are offlined).
Depends on:
- next-20140804 branch of linux-next kernel tree
- [PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35262.html)
- [PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
Changes since v4:
- rebased on top of next-20140804 +
[PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35262.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
- call exynos_save_cp15() only on A9 type core (this is needed for the future
Exynos3250 SoC support)
Changes since v3:
- rebased on top of next-20140804 +
[PATCH v4][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35192.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
- (re-)added patch fixing S5P_CENTRAL_SEQ_OPTION register setup
Changes since v2:
- rebased on top of next-20140708 +
[PATCH 5/6] ARM: EXYNOS: Fix suspend/resume sequencies
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32809.html)
[with rejects fixed]
[PATCH 6/6] ARM: EXYNOS: Register cpuidle device only on Exynos4210 and 5250
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32808.html)
[PATCH 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32991.html)
[with rejects fixed in patch #2]
- addressed review comments from Tomasz Figa and Daniel Lezcano
Changes since v1:
- synced against next-20140602
- added missing Acked-by-s
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Bartlomiej Zolnierkiewicz (5):
ARM: EXYNOS: PM: replace EXYNOS_BOOT_VECTOR_* macros by static inlines
ARM: EXYNOS: add AFTR mode support to firmware do_idle method
ARM: EXYNOS: cpuidle: add secure firmware support to AFTR mode code
ARM: EXYNOS: PM: fix register setup for AFTR mode code
ARM: EXYNOS: cpuidle: allow driver usage on Exynos4x12 SoCs
arch/arm/include/asm/firmware.h | 2 +-
arch/arm/mach-exynos/common.h | 5 ++++
arch/arm/mach-exynos/exynos.c | 4 ++-
arch/arm/mach-exynos/firmware.c | 34 ++++++++++++++++-------
arch/arm/mach-exynos/pm.c | 60 ++++++++++++++++++++++++-----------------
5 files changed, 70 insertions(+), 35 deletions(-)
--
1.8.2.3
On some platforms (i.e. EXYNOS ones) more than one idle mode is
available and we need to distinguish them in firmware do_idle method.
Add mode parameter to do_idle firmware method and AFTR mode support
to EXYNOS do_idle implementation.
This change is a preparation for adding secure firmware support to
EXYNOS cpuidle driver.
This patch shouldn't cause any functionality changes (please note
that do_idle firmware method is unused currently).
Signed-off-by: Bartlomiej Zolnierkiewicz <redacted>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/include/asm/firmware.h | 2 +-
arch/arm/mach-exynos/common.h | 5 +++++
arch/arm/mach-exynos/firmware.c | 10 ++++++++--
3 files changed, 14 insertions(+), 3 deletions(-)
* Move cp15 registers saving to exynos_save_cp15() helper and add
additional helper usage to do_idle firmware method.
* Use resume firmware method instead of exynos_cpu_restore_register()
and skip exynos_cpu_save_register() on boards with secure firmware
enabled.
* Use sysram_ns_base_addr + 0x24/0x20 addresses instead of the default
ones used by exynos_cpu_set_boot_vector() on boards with secure
firmware enabled.
* Use do_idle firmware method instead of cpu_do_idle() on boards with
secure firmware enabled.
Signed-off-by: Bartlomiej Zolnierkiewicz <redacted>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/firmware.c | 24 +++++++++++++++++-------
arch/arm/mach-exynos/pm.c | 17 ++++++++++++-----
2 files changed, 29 insertions(+), 12 deletions(-)
@@ -25,13 +25,28 @@#include"smc.h"#define EXYNOS_SLEEP_MAGIC 0x00000bad+#define EXYNOS_AFTR_MAGIC 0xfcba0d10#define EXYNOS_BOOT_ADDR 0x8#define EXYNOS_BOOT_FLAG 0xc+staticvoidexynos_save_cp15(void)+{+/* Save Power control and Diagnostic registers */+asm("mrc p15, 0, %0, c15, c0, 0\n"+"mrc p15, 0, %1, c15, c0, 1\n"+:"=r"(cp15_save_power),"=r"(cp15_save_diag)+::"cc");+}+staticintexynos_do_idle(unsignedlongmode){switch(mode){caseFW_DO_IDLE_AFTR:+if(read_cpuid_part()==ARM_CPU_PART_CORTEX_A9)+exynos_save_cp15();+__raw_writel(virt_to_phys(exynos_cpu_resume_ns),+sysram_ns_base_addr+0x24);+__raw_writel(EXYNOS_AFTR_MAGIC,sysram_ns_base_addr+0x20);exynos_smc(SMC_CMD_CPU0AFTR,0,0,0);break;caseFW_DO_IDLE_SLEEP:
@@ -96,13 +111,8 @@ static int exynos_cpu_suspend(unsigned long arg)staticintexynos_suspend(void){-if(read_cpuid_part()==ARM_CPU_PART_CORTEX_A9){-/* Save Power control and Diagnostic registers */-asm("mrc p15, 0, %0, c15, c0, 0\n"-"mrc p15, 0, %1, c15, c0, 1\n"-:"=r"(cp15_save_power),"=r"(cp15_save_diag)-::"cc");-}+if(read_cpuid_part()==ARM_CPU_PART_CORTEX_A9)+exynos_save_cp15();writel(EXYNOS_SLEEP_MAGIC,sysram_ns_base_addr+EXYNOS_BOOT_FLAG);writel(virt_to_phys(exynos_cpu_resume_ns),
@@ -209,11 +209,19 @@ static void exynos_cpu_set_boot_vector(long flags)staticintexynos_aftr_finisher(unsignedlongflags){+intret;+exynos_set_wakeupmask(0x0000ff3e);-exynos_cpu_set_boot_vector(S5P_CHECK_AFTR);/* Set value of power down register for aftr mode */exynos_sys_powerdown_conf(SYS_AFTR);-cpu_do_idle();++ret=call_firmware_op(do_idle,FW_DO_IDLE_AFTR);+if(ret==-ENOSYS){+if(read_cpuid_part()==ARM_CPU_PART_CORTEX_A9)+exynos_cpu_save_register();+exynos_cpu_set_boot_vector(S5P_CHECK_AFTR);+cpu_do_idle();+}return1;}
Add S5P_CENTRAL_SEQ_OPTION register setup to cpuidle AFTR mode code
by moving the relevant code from exynos_pm_suspend() (used only by
suspend) to exynos_pm_central_suspend() (used by both suspend and
AFTR). Without this setup AFTR mode doesn't show any benefit over
WFI one (at least on Exynos4412 SoC). When this setup is applied
AFTR mode reduces power consumption by ~12% (as measured on Trats2
board).
This change is a preparation for adding secure firmware support to
EXYNOS cpuidle driver.
Signed-off-by: Bartlomiej Zolnierkiewicz <redacted>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/pm.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
Register cpuidle platform device on Exynos4x12 SoCs allowing EXYNOS
cpuidle driver usage on these SoCs.
AFTR mode reduces power consumption on Trats2 board (Exynos4412 SoC
with secure firmware enabled) by ~12% when EXYNOS cpuidle driver is
enabled (in both cases the default exynos_defconfig config is used
and CPU1-3 are offlined).
Signed-off-by: Bartlomiej Zolnierkiewicz <redacted>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/mach-exynos/exynos.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
From: Daniel Lezcano <hidden> Date: 2014-08-05 13:51:05
On 08/05/2014 03:34 PM, Bartlomiej Zolnierkiewicz wrote:
Hi,
This patch series adds support for AFTR idle mode on boards with
secure firmware enabled and allows EXYNOS cpuidle driver usage on
Exynos4x12 SoCs.
It has been tested on Trats2 board (using Exynos4412 SoC with secure
firmware enabled) on which AFTR mode reduces power consumption by ~12%
when EXYNOS cpuidle driver is enabled (in both cases the default
exynos_defconfig config is used and CPU1-3 are offlined).
Hi Bartlomiej,
I tested your patchset on an odroid-u2. When the cpuidle driver is
enabled and the cpu1-3 are offlined, the kernel hangs.
If I disable the AFTR state on cpuidle, and offline the 1-3, it works as
expected. So there is something wrong with the AFTR on the odroid board.
Depends on:
- next-20140804 branch of linux-next kernel tree
- [PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35262.html)
- [PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
Changes since v4:
- rebased on top of next-20140804 +
[PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35262.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
- call exynos_save_cp15() only on A9 type core (this is needed for the future
Exynos3250 SoC support)
Changes since v3:
- rebased on top of next-20140804 +
[PATCH v4][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35192.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
- (re-)added patch fixing S5P_CENTRAL_SEQ_OPTION register setup
Changes since v2:
- rebased on top of next-20140708 +
[PATCH 5/6] ARM: EXYNOS: Fix suspend/resume sequencies
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32809.html)
[with rejects fixed]
[PATCH 6/6] ARM: EXYNOS: Register cpuidle device only on Exynos4210 and 5250
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32808.html)
[PATCH 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32991.html)
[with rejects fixed in patch #2]
- addressed review comments from Tomasz Figa and Daniel Lezcano
Changes since v1:
- synced against next-20140602
- added missing Acked-by-s
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Bartlomiej Zolnierkiewicz (5):
ARM: EXYNOS: PM: replace EXYNOS_BOOT_VECTOR_* macros by static inlines
ARM: EXYNOS: add AFTR mode support to firmware do_idle method
ARM: EXYNOS: cpuidle: add secure firmware support to AFTR mode code
ARM: EXYNOS: PM: fix register setup for AFTR mode code
ARM: EXYNOS: cpuidle: allow driver usage on Exynos4x12 SoCs
arch/arm/include/asm/firmware.h | 2 +-
arch/arm/mach-exynos/common.h | 5 ++++
arch/arm/mach-exynos/exynos.c | 4 ++-
arch/arm/mach-exynos/firmware.c | 34 ++++++++++++++++-------
arch/arm/mach-exynos/pm.c | 60 ++++++++++++++++++++++++-----------------
5 files changed, 70 insertions(+), 35 deletions(-)
From: Daniel Lezcano <hidden> Date: 2014-08-05 14:03:28
On 08/05/2014 03:34 PM, Bartlomiej Zolnierkiewicz wrote:
Hi,
This patch series adds support for AFTR idle mode on boards with
secure firmware enabled and allows EXYNOS cpuidle driver usage on
Exynos4x12 SoCs.
It has been tested on Trats2 board (using Exynos4412 SoC with secure
firmware enabled) on which AFTR mode reduces power consumption by ~12%
when EXYNOS cpuidle driver is enabled (in both cases the default
exynos_defconfig config is used and CPU1-3 are offlined).
As a sidenote:
On my odroid-U2:
* 4 cpus online -> 130 mA
* 3 cpus online -> 164 mA
* 2 cpus online -> 160 mA
* 1 cpu online -> 157 mA
So were are consuming more when there are unplugged cpu ... any ideas ?
Thanks !
-- Daniel
Depends on:
- next-20140804 branch of linux-next kernel tree
- [PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35262.html)
- [PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
Changes since v4:
- rebased on top of next-20140804 +
[PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35262.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
- call exynos_save_cp15() only on A9 type core (this is needed for the future
Exynos3250 SoC support)
Changes since v3:
- rebased on top of next-20140804 +
[PATCH v4][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35192.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
- (re-)added patch fixing S5P_CENTRAL_SEQ_OPTION register setup
Changes since v2:
- rebased on top of next-20140708 +
[PATCH 5/6] ARM: EXYNOS: Fix suspend/resume sequencies
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32809.html)
[with rejects fixed]
[PATCH 6/6] ARM: EXYNOS: Register cpuidle device only on Exynos4210 and 5250
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32808.html)
[PATCH 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32991.html)
[with rejects fixed in patch #2]
- addressed review comments from Tomasz Figa and Daniel Lezcano
Changes since v1:
- synced against next-20140602
- added missing Acked-by-s
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Bartlomiej Zolnierkiewicz (5):
ARM: EXYNOS: PM: replace EXYNOS_BOOT_VECTOR_* macros by static inlines
ARM: EXYNOS: add AFTR mode support to firmware do_idle method
ARM: EXYNOS: cpuidle: add secure firmware support to AFTR mode code
ARM: EXYNOS: PM: fix register setup for AFTR mode code
ARM: EXYNOS: cpuidle: allow driver usage on Exynos4x12 SoCs
arch/arm/include/asm/firmware.h | 2 +-
arch/arm/mach-exynos/common.h | 5 ++++
arch/arm/mach-exynos/exynos.c | 4 ++-
arch/arm/mach-exynos/firmware.c | 34 ++++++++++++++++-------
arch/arm/mach-exynos/pm.c | 60 ++++++++++++++++++++++++-----------------
5 files changed, 70 insertions(+), 35 deletions(-)
From: Krzysztof Kozlowski <hidden> Date: 2014-08-05 14:26:25
On 05.08.2014 16:03, Daniel Lezcano wrote:
On 08/05/2014 03:34 PM, Bartlomiej Zolnierkiewicz wrote:
quoted
Hi,
This patch series adds support for AFTR idle mode on boards with
secure firmware enabled and allows EXYNOS cpuidle driver usage on
Exynos4x12 SoCs.
It has been tested on Trats2 board (using Exynos4412 SoC with secure
firmware enabled) on which AFTR mode reduces power consumption by ~12%
when EXYNOS cpuidle driver is enabled (in both cases the default
exynos_defconfig config is used and CPU1-3 are offlined).
As a sidenote:
On my odroid-U2:
* 4 cpus online -> 130 mA
* 3 cpus online -> 164 mA
* 2 cpus online -> 160 mA
* 1 cpu online -> 157 mA
So were are consuming more when there are unplugged cpu ... any ideas ?
On which tree are you testing? Current next has ARMCLK down feature
enabled. ARMCLK down may stop working after hotunplugging CPU:
http://www.spinics.net/lists/arm-kernel/msg352890.html
That was observed especially on Exynos4212 where ARMCLK down stops
working permanently. On Trats2 (Exynos4412) the clock down stopped only
a for short period after disabling CPU.
Best regards,
Krzysztof
From: Daniel Lezcano <hidden> Date: 2014-08-05 15:07:44
On 08/05/2014 04:26 PM, Krzysztof Kozlowski wrote:
On 05.08.2014 16:03, Daniel Lezcano wrote:
quoted
On 08/05/2014 03:34 PM, Bartlomiej Zolnierkiewicz wrote:
quoted
Hi,
This patch series adds support for AFTR idle mode on boards with
secure firmware enabled and allows EXYNOS cpuidle driver usage on
Exynos4x12 SoCs.
It has been tested on Trats2 board (using Exynos4412 SoC with secure
firmware enabled) on which AFTR mode reduces power consumption by ~12%
when EXYNOS cpuidle driver is enabled (in both cases the default
exynos_defconfig config is used and CPU1-3 are offlined).
As a sidenote:
On my odroid-U2:
* 4 cpus online -> 130 mA
* 3 cpus online -> 164 mA
* 2 cpus online -> 160 mA
* 1 cpu online -> 157 mA
So were are consuming more when there are unplugged cpu ... any ideas ?
On which tree are you testing? Current next has ARMCLK down feature
enabled. ARMCLK down may stop working after hotunplugging CPU:
http://www.spinics.net/lists/arm-kernel/msg352890.html
That was observed especially on Exynos4212 where ARMCLK down stops
working permanently. On Trats2 (Exynos4412) the clock down stopped only
a for short period after disabling CPU.
Hi Krzysztof,
I tested the patches you mentioned above on top of this patchset.
You are right this is directly related to the ARMCLK but the behavior
may be not as you expect I think.
When I boot:
4 cpus online => 131 mA
Then I unplug one by one the cpus:
3 cpus online => 127 mA
2 cpus online => 123 mA
1 cpu online => 120 mA
This is consistent.
But now, I online the cpus:
2 cpus online => 162 mA
3 cpus online => 165 mA
4 cpus online => 131 mA
-- side note --
Please note, I did not disable the cpuidle neither the AFTR state and
the kernel did not hang but I don't see the noticeable power saving we
should be observing when there is one cpu remaining entering the AFTR
state (cpuidle stats show we enter AFTR). So there is definitively
something wrong with this state.
--
<http://www.linaro.org/> Linaro.org ? Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
On Tuesday, August 05, 2014 03:50:54 PM Daniel Lezcano wrote:
On 08/05/2014 03:34 PM, Bartlomiej Zolnierkiewicz wrote:
quoted
Hi,
This patch series adds support for AFTR idle mode on boards with
secure firmware enabled and allows EXYNOS cpuidle driver usage on
Exynos4x12 SoCs.
It has been tested on Trats2 board (using Exynos4412 SoC with secure
firmware enabled) on which AFTR mode reduces power consumption by ~12%
when EXYNOS cpuidle driver is enabled (in both cases the default
exynos_defconfig config is used and CPU1-3 are offlined).
Hi Bartlomiej,
Hi Daniel,
I tested your patchset on an odroid-u2. When the cpuidle driver is
enabled and the cpu1-3 are offlined, the kernel hangs.
If I disable the AFTR state on cpuidle, and offline the 1-3, it works as
expected. So there is something wrong with the AFTR on the odroid board.
Thanks for testing. I reproduced the problem on ODROID-U3 board. I also
tested Exynos4412 based Origen board and it also has problem with AFTR mode.
We did some debugging but nothing specific has came up yet (we suspect that
the issue may be caused by incompatibilities of bootloader firmware of
ODROID-U2/U3 and Origen4412 boards). We will keep investigating this but
in the meantime I would like to have this patchset acked/merged if possible
(with Exynos4412 support limited to Trats2 target currently [*]) as:
- it contains mostly fundamental changes for all secure firmware enabled
boards (which would be needed also on ODROID/Origen4412 boards if we get
AFTR mode working on them)
- it adds working AFTR mode support for Exynos4412 Trats2 target
- it prepares support for Exynos4212 and Exynos3250 targets which are
working fine with AFTR mode in our internal kernels and which are not
yet upstreamed
[*] In the future it should be possible to enable AFTR mode support per
board using DT (basing on patches from Lorenzo), for now it should be
fine to check for Trats2 target directly while registering cpuidle
platform device. I will post v6 soon.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
quoted
Depends on:
- next-20140804 branch of linux-next kernel tree
- [PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35262.html)
- [PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
Changes since v4:
- rebased on top of next-20140804 +
[PATCH v5][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35262.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
- call exynos_save_cp15() only on A9 type core (this is needed for the future
Exynos3250 SoC support)
Changes since v3:
- rebased on top of next-20140804 +
[PATCH v4][next-20140804] ARM: EXYNOS: Fix suspend/resume sequences
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg35192.html)
[PATCH v2 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg34282.html)
- (re-)added patch fixing S5P_CENTRAL_SEQ_OPTION register setup
Changes since v2:
- rebased on top of next-20140708 +
[PATCH 5/6] ARM: EXYNOS: Fix suspend/resume sequencies
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32809.html)
[with rejects fixed]
[PATCH 6/6] ARM: EXYNOS: Register cpuidle device only on Exynos4210 and 5250
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32808.html)
[PATCH 0/2] Firmware-assisted suspend/resume of Exynos SoCs
(http://www.mail-archive.com/linux-samsung-soc at vger.kernel.org/msg32991.html)
[with rejects fixed in patch #2]
- addressed review comments from Tomasz Figa and Daniel Lezcano
Changes since v1:
- synced against next-20140602
- added missing Acked-by-s
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Bartlomiej Zolnierkiewicz (5):
ARM: EXYNOS: PM: replace EXYNOS_BOOT_VECTOR_* macros by static inlines
ARM: EXYNOS: add AFTR mode support to firmware do_idle method
ARM: EXYNOS: cpuidle: add secure firmware support to AFTR mode code
ARM: EXYNOS: PM: fix register setup for AFTR mode code
ARM: EXYNOS: cpuidle: allow driver usage on Exynos4x12 SoCs
arch/arm/include/asm/firmware.h | 2 +-
arch/arm/mach-exynos/common.h | 5 ++++
arch/arm/mach-exynos/exynos.c | 4 ++-
arch/arm/mach-exynos/firmware.c | 34 ++++++++++++++++-------
arch/arm/mach-exynos/pm.c | 60 ++++++++++++++++++++++++-----------------
5 files changed, 70 insertions(+), 35 deletions(-)
From: Krzysztof Kozlowski <hidden> Date: 2014-09-05 12:28:15
On wto, 2014-08-05 at 17:07 +0200, Daniel Lezcano wrote:
On 08/05/2014 04:26 PM, Krzysztof Kozlowski wrote:
quoted
On 05.08.2014 16:03, Daniel Lezcano wrote:
quoted
On 08/05/2014 03:34 PM, Bartlomiej Zolnierkiewicz wrote:
quoted
Hi,
This patch series adds support for AFTR idle mode on boards with
secure firmware enabled and allows EXYNOS cpuidle driver usage on
Exynos4x12 SoCs.
It has been tested on Trats2 board (using Exynos4412 SoC with secure
firmware enabled) on which AFTR mode reduces power consumption by ~12%
when EXYNOS cpuidle driver is enabled (in both cases the default
exynos_defconfig config is used and CPU1-3 are offlined).
As a sidenote:
On my odroid-U2:
* 4 cpus online -> 130 mA
* 3 cpus online -> 164 mA
* 2 cpus online -> 160 mA
* 1 cpu online -> 157 mA
So were are consuming more when there are unplugged cpu ... any ideas ?
On which tree are you testing? Current next has ARMCLK down feature
enabled. ARMCLK down may stop working after hotunplugging CPU:
http://www.spinics.net/lists/arm-kernel/msg352890.html
That was observed especially on Exynos4212 where ARMCLK down stops
working permanently. On Trats2 (Exynos4412) the clock down stopped only
a for short period after disabling CPU.
Hi Krzysztof,
I tested the patches you mentioned above on top of this patchset.
You are right this is directly related to the ARMCLK but the behavior
may be not as you expect I think.
When I boot:
4 cpus online => 131 mA
Then I unplug one by one the cpus:
3 cpus online => 127 mA
2 cpus online => 123 mA
1 cpu online => 120 mA
This is consistent.
But now, I online the cpus:
2 cpus online => 162 mA
3 cpus online => 165 mA
4 cpus online => 131 mA
-- side note --
Please note, I did not disable the cpuidle neither the AFTR state and
the kernel did not hang but I don't see the noticeable power saving we
should be observing when there is one cpu remaining entering the AFTR
state (cpuidle stats show we enter AFTR). So there is definitively
something wrong with this state.
Strange things happen... on current next-20140904 I couldn't reproduce
this inconsistent energy consumption after hotplug. At least on Trats2
(Exynos4412) and Gear1 (Exynos4212) it behaves consistently (and
properly with my patches).
Anyway I'll respin the patchset.
Best regards,
Krzysztof