Skip to contentSkip to conversation

ARM: shmobile: Support L2 shutdown mode in Suspend-to-RAM

RFC PATCH Superseded Khiem Nguyen 2 participants 4 messages Sep 26, 2014 SuperH

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover ARM: shmobile: Support L2 shutdown mode in Suspend-to-RAM

These patches implement L2 shutdown mode in RCar Gen2 SoC and change Suspend-to-RAM from Core Standby mode to L2 shutdown mode. The impact to CPUIdle operation was also put into consideration during implementation.

I have confirmed Suspend-to-RAM in Lager board and Koelsch board. So far, there is no regression detected during my testing. There might be further patches to support Alt board. But it would be after upstream kernel can boot up in Alt board.

I hope to receive some comments for this patch series whether it's right direction or not. Therefore, I marked it with RFC. Any comments are appreciated.

This patch series is written on top of renesas-devel-20140924-v3.17-rc6 and has dependency on CPUIdle patches from Kobayashi-san
(http://www.spinics.net/lists/linux-sh/msg34150.html).

Khiem Nguyen (7):
ARM: shmobile: use common ARMv7 cache disabling code
ARM: shmobile: use signals from SYSC to wake up from Suspend-to-RAM
ARM: shmobile: Implement L2 shutdown mode for Suspend-to-RAM
ARM: shmobile: Backup and restore L2CTLR in Suspend-to-RAM
ARM: shmobile: Clear External Event Request in system resume
ARM: shmobile: Do additional settings for L2shutdown mode
ARM: shmobile: Use separate CPUCMCR addresses for CA15/CA7

 arch/arm/mach-shmobile/common.h       |    4 ++
 arch/arm/mach-shmobile/headsmp.S      |   28 ++++++++++++
 arch/arm/mach-shmobile/platsmp-apmu.c |   81 ++++++++++++++++++++++++---------
 arch/arm/mach-shmobile/pm-rcar.c      |   22 +++++++++
 arch/arm/mach-shmobile/pm-rcar.h      |    1 +
 5 files changed, 115 insertions(+), 21 deletions(-)
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Khiem-san,

Quoted 5 lines · Khiem Nguyen

These patches implement L2 shutdown mode in RCar Gen2 SoC and change Suspend-to-RAM from Core Standby mode to L2 shutdown mode. The impact to CPUIdle operation was also put into consideration during implementation.

Quoted 8 lines

I have confirmed Suspend-to-RAM in Lager board and Koelsch board. So far, there is no regression detected during my testing. There might be further patches to support Alt board. But it would be after upstream kernel can boot up in Alt board.

I hope to receive some comments for this patch series whether it's right direction or not. Therefore, I marked it with RFC. Any comments are appreciated.

While testing with various combinations of CONFIG_PM options, I noticed the build fails if CONFIG_ARM_CPU_SUSPEND is not set:

arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_apmu_enter_cpuidle':
:(.text+0x27c): undefined reference to cpu_suspend' arch/arm/mach-shmobile/built-in.o: In function shmobile_cpuidle_notifier_call':
:(.text+0x305c): undefined reference to cpu_resume' arch/arm/mach-shmobile/built-in.o: In function shmobile_smp_apmu_prepare_cpus':
:(.init.text+0xddc): undefined reference to cpu_resume' arch/arm/mach-shmobile/built-in.o: In function shmobile_cpuidle_init':
:(.init.text+0xe9c): undefined reference to `cpu_resume'
make[3]: *** [vmlinux] Error 1
make[2]: *** [sub-make] Error 2
make[1]: *** [__sub-make] Error 2
make: *** [all] Error 2

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
In reply to Khiem Nguyen

Hi Geert-san,

Quoted 21 lines · Geert Uytterhoeven

Hi Khiem-san,

Quoted 5 lines · Khiem Nguyen

These patches implement L2 shutdown mode in RCar Gen2 SoC and change Suspend-to-RAM from Core Standby mode to L2 shutdown mode. The impact to CPUIdle operation was also put into consideration during implementation.

Quoted 8 lines

I have confirmed Suspend-to-RAM in Lager board and Koelsch board. So far, there is no regression detected during my testing. There might be further patches to support Alt board. But it would be after upstream kernel can boot up in Alt board.

I hope to receive some comments for this patch series whether it's right direction or not. Therefore, I marked it with RFC. Any comments are appreciated.

While testing with various combinations of CONFIG_PM options, I noticed the build fails if CONFIG_ARM_CPU_SUSPEND is not set:

Quoted 14 lines

arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_apmu_enter_cpuidle':
:(.text+0x27c): undefined reference to cpu_suspend' arch/arm/mach-shmobile/built-in.o: In function shmobile_cpuidle_notifier_call':
:(.text+0x305c): undefined reference to cpu_resume' arch/arm/mach-shmobile/built-in.o: In function shmobile_smp_apmu_prepare_cpus':
:(.init.text+0xddc): undefined reference to cpu_resume' arch/arm/mach-shmobile/built-in.o: In function shmobile_cpuidle_init':
:(.init.text+0xe9c): undefined reference to `cpu_resume'
make[3]: *** [vmlinux] Error 1
make[2]: *** [sub-make] Error 2
make[1]: *** [__sub-make] Error 2
make: *** [all] Error 2

That is interesting build error.
To make it clearer and able to fix it, please kindly confirm below points:
1. This only occurred after merging my patch ?
(The part related to shmobile_cpuidle_init seems out of my scope.)
2. What kind of 'various combinations of CONFIG_PM options' were you select ?

Thanks.

Quoted 11 lines

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Signature · 2 lines
Best regards,
KHIEM Nguyen
#3 lore raw
In reply to Khiem Nguyen
Quoted 38 lines · Khiem Nguyen

Hi Geert-san,

Quoted 21 lines · Geert Uytterhoeven

Hi Khiem-san,

Quoted 5 lines · Khiem Nguyen

These patches implement L2 shutdown mode in RCar Gen2 SoC and change Suspend-to-RAM from Core Standby mode to L2 shutdown mode. The impact to CPUIdle operation was also put into consideration during implementation.

Quoted 8 lines

I have confirmed Suspend-to-RAM in Lager board and Koelsch board. So far, there is no regression detected during my testing. There might be further patches to support Alt board. But it would be after upstream kernel can boot up in Alt board.

I hope to receive some comments for this patch series whether it's right direction or not. Therefore, I marked it with RFC. Any comments are appreciated.

While testing with various combinations of CONFIG_PM options, I noticed the build fails if CONFIG_ARM_CPU_SUSPEND is not set:

Quoted 14 lines

arch/arm/mach-shmobile/built-in.o: In function `shmobile_smp_apmu_enter_cpuidle':
:(.text+0x27c): undefined reference to cpu_suspend' arch/arm/mach-shmobile/built-in.o: In function shmobile_cpuidle_notifier_call':
:(.text+0x305c): undefined reference to cpu_resume' arch/arm/mach-shmobile/built-in.o: In function shmobile_smp_apmu_prepare_cpus':
:(.init.text+0xddc): undefined reference to cpu_resume' arch/arm/mach-shmobile/built-in.o: In function shmobile_cpuidle_init':
:(.init.text+0xe9c): undefined reference to `cpu_resume'
make[3]: *** [vmlinux] Error 1
make[2]: *** [sub-make] Error 2
make[1]: *** [__sub-make] Error 2
make: *** [all] Error 2

Quoted 5 lines

That is interesting build error.
To make it clearer and able to fix it, please kindly confirm below points:
1. This only occurred after merging my patch ?
(The part related to shmobile_cpuidle_init seems out of my scope.)
2. What kind of 'various combinations of CONFIG_PM options' were you select ?

To answer my own questions,
1. The build error occurred /after/ merging CPUIdle patches from Kobayashi-san.
2. If CONFIG_SUSPEND is disabled (and CPUIdle patches was merged), this build error occurred.
(CONFIG_ARM_CPU_SUSPEND has dependency on CONFIG_SUSPEND)

@Kobayashi-san,
Please take care of this build error in your V2 patches.

Thanks.

Quoted 15 lines

Thanks.

Quoted 11 lines

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

Signature · 2 lines
Best regards,
KHIEM Nguyen