diff mbox series

riscv: Enable ARCH_SUSPEND_POSSIBLE for s2idle

Message ID 20230529101524.322076-1-songshuaishuai@tinylab.org (mailing list archive)
State Accepted
Commit c1f048a6bd7d7cb42e9bfd79eff85b33894997fe
Headers show
Series riscv: Enable ARCH_SUSPEND_POSSIBLE for s2idle | expand

Checks

Context Check Description
conchuod/cover_letter success Single patches do not need cover letters
conchuod/tree_selection success Guessed tree name to be for-next at HEAD ac9a78681b92
conchuod/fixes_present success Fixes tag not required for -next series
conchuod/maintainers_pattern success MAINTAINERS pattern errors before the patch: 6 and now 6
conchuod/verify_signedoff success Signed-off-by tag matches author and committer
conchuod/kdoc success Errors and warnings before: 0 this patch: 0
conchuod/build_rv64_clang_allmodconfig success Errors and warnings before: 2671 this patch: 2671
conchuod/module_param success Was 0 now: 0
conchuod/build_rv64_gcc_allmodconfig fail Errors and warnings before: 15607 this patch: 15673
conchuod/build_rv32_defconfig success Build OK
conchuod/dtb_warn_rv64 success Errors and warnings before: 3 this patch: 3
conchuod/header_inline success No static functions without inline keyword in header files
conchuod/checkpatch success total: 0 errors, 0 warnings, 0 checks, 9 lines checked
conchuod/build_rv64_nommu_k210_defconfig success Build OK
conchuod/verify_fixes success No Fixes tag
conchuod/build_rv64_nommu_virt_defconfig success Build OK

Commit Message

Song Shuai May 29, 2023, 10:15 a.m. UTC
With this configuration opened, the basic platform-independent s2idle is
provided by the sole "s2idle" string in `/sys/power/mem_sleep`.

At the end of s2idle, harts will hit the `wfi` instruction or enter the
SUSPENDED state through the sbi_cpuidle driver. The interrupt of possible
wakeup devices will be kept to wake the system up.

And platform-specific sleep states can be provided by future ACPI and
SBI SUSP extension support.

Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
---
 arch/riscv/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

Comments

Andrew Jones May 29, 2023, 1:08 p.m. UTC | #1
On Mon, May 29, 2023 at 06:15:24PM +0800, Song Shuai wrote:
> With this configuration opened, the basic platform-independent s2idle is
> provided by the sole "s2idle" string in `/sys/power/mem_sleep`.
> 
> At the end of s2idle, harts will hit the `wfi` instruction or enter the
> SUSPENDED state through the sbi_cpuidle driver. The interrupt of possible
> wakeup devices will be kept to wake the system up.
> 
> And platform-specific sleep states can be provided by future ACPI and
> SBI SUSP extension support.
> 
> Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
> ---
>  arch/riscv/Kconfig | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> index 348c0fa1fc8c..4bb818035585 100644
> --- a/arch/riscv/Kconfig
> +++ b/arch/riscv/Kconfig
> @@ -805,6 +805,9 @@ config ARCH_HIBERNATION_POSSIBLE
>  config ARCH_HIBERNATION_HEADER
>  	def_bool HIBERNATION
>  
> +config ARCH_SUSPEND_POSSIBLE
> +	def_bool y
> +
>  endmenu # "Power management options"
>  
>  menu "CPU Power Management"
> -- 
> 2.20.1
>

Reviewed-by: Andrew Jones <ajones@ventanamicro.com>

Thanks,
drew
Palmer Dabbelt July 5, 2023, 11:38 p.m. UTC | #2
On Mon, 29 May 2023 18:15:24 +0800, Song Shuai wrote:
> With this configuration opened, the basic platform-independent s2idle is
> provided by the sole "s2idle" string in `/sys/power/mem_sleep`.
> 
> At the end of s2idle, harts will hit the `wfi` instruction or enter the
> SUSPENDED state through the sbi_cpuidle driver. The interrupt of possible
> wakeup devices will be kept to wake the system up.
> 
> [...]

Applied, thanks!

[1/1] riscv: Enable ARCH_SUSPEND_POSSIBLE for s2idle
      https://git.kernel.org/palmer/c/c1f048a6bd7d

Best regards,
patchwork-bot+linux-riscv@kernel.org July 5, 2023, 11:50 p.m. UTC | #3
Hello:

This patch was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <palmer@rivosinc.com>:

On Mon, 29 May 2023 18:15:24 +0800 you wrote:
> With this configuration opened, the basic platform-independent s2idle is
> provided by the sole "s2idle" string in `/sys/power/mem_sleep`.
> 
> At the end of s2idle, harts will hit the `wfi` instruction or enter the
> SUSPENDED state through the sbi_cpuidle driver. The interrupt of possible
> wakeup devices will be kept to wake the system up.
> 
> [...]

Here is the summary with links:
  - riscv: Enable ARCH_SUSPEND_POSSIBLE for s2idle
    https://git.kernel.org/riscv/c/c1f048a6bd7d

You are awesome, thank you!
diff mbox series

Patch

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 348c0fa1fc8c..4bb818035585 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -805,6 +805,9 @@  config ARCH_HIBERNATION_POSSIBLE
 config ARCH_HIBERNATION_HEADER
 	def_bool HIBERNATION
 
+config ARCH_SUSPEND_POSSIBLE
+	def_bool y
+
 endmenu # "Power management options"
 
 menu "CPU Power Management"