From: Andrew Jones <ajones@ventanamicro.com>
To: linux-riscv@lists.infradead.org
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, leyfoon.tan@starfivetech.com,
jeeheng.sia@starfivetech.com, conor.dooley@microchip.com,
apatel@ventanamicro.com, samuel.holland@sifive.com,
songshuaishuai@tinylab.org
Subject: [PATCH v3 0/1] riscv: Introduce system suspend support
Date: Wed, 6 Dec 2023 12:08:08 +0100 [thread overview]
Message-ID: <20231206110807.35882-3-ajones@ventanamicro.com> (raw)
OpenSBI v1.3 and later supports the SUSP SBI extension which has recently
been frozen with the freezing of SBI 2.0. This one patch series adds
system suspend support to Linux, which implements "suspend-to-RAM". To
use it, build the kernel with CONFIG_SUSPEND, boot on a platform which
supports system suspend, and then issue 'echo mem > /sys/power/state'.
It's also possible to test this Linux support on a platform without
system suspend by using OpenSBI's system suspend test support. To enable
test support add
opensbi-domains {
compatible = "opensbi,domain,config";
system-suspend-test;
};
to the chosen node of the device tree. With the test node present,
OpenSBI will wait 5 seconds on a suspend and then kick a resume.
Changes for v3:
- Drop the redundant ARCH_SUSPEND_POSSIBLE addition [Samuel]
(v1 changed the def_bool to RISCV_SBI, but now it's 'y'
again. This should be fine since an S-mode Linux will always
have RISCV_SBI and an M-mode might actually be able to use
s2idle.)
Changes for v2:
- Rebase on v6.7-rc1
- Added check for SBI spec version 2.0, which is the first ratified
spec version with SUSP [Conor, Anup]
- Picked up t-b from Samuel
Changes for v1:
- Rebase on v6.6-rc1 -- only minor Kconfig change needed
Changes for RFC-v2:
- RISCV_SBI dependency [Conor]
- Rename SBI_EXT_SUSP_SUSPEND to SBI_EXT_SUSP_SYSTEM_SUSPEND and
SBI_SUSP_SLEEP_TYPE_SUSPEND to SBI_SUSP_SLEEP_TYPE_SUSPEND_TO_RAM [Ley Foon]
Andrew Jones (1):
riscv: sbi: Introduce system suspend support
arch/riscv/Kconfig | 2 +-
arch/riscv/include/asm/sbi.h | 9 ++++++++
arch/riscv/kernel/suspend.c | 44 ++++++++++++++++++++++++++++++++++++
3 files changed, 54 insertions(+), 1 deletion(-)
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next reply other threads:[~2023-12-06 11:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 11:08 Andrew Jones [this message]
2023-12-06 11:08 ` [PATCH v3 1/1] riscv: sbi: Introduce system suspend support Andrew Jones
2023-12-06 12:23 ` Conor Dooley
2023-12-06 12:40 ` Andrew Jones
2024-01-11 14:50 ` [PATCH v3 0/1] riscv: " patchwork-bot+linux-riscv
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=20231206110807.35882-3-ajones@ventanamicro.com \
--to=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=apatel@ventanamicro.com \
--cc=conor.dooley@microchip.com \
--cc=jeeheng.sia@starfivetech.com \
--cc=leyfoon.tan@starfivetech.com \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=samuel.holland@sifive.com \
--cc=songshuaishuai@tinylab.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox