riscv: Introduce system suspend support
cover riscv: Introduce system suspend support
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.
Note: Resume may fail without the fix for probing misaligned access speed[1]. It's best to apply that fix before attempting system suspend.
[1] https://lore.kernel.org/all/[email protected]/
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 | 5 ++++- arch/riscv/include/asm/sbi.h | 9 ++++++++ arch/riscv/kernel/suspend.c | 43 ++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-)
Signature · 7 lines
2.41.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
PATCH 1/1 riscv: sbi: Introduce system suspend support
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with CONFIG_SUSPEND, one can do 'echo mem > /sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.
--- arch/riscv/Kconfig | 5 ++++- arch/riscv/include/asm/sbi.h | 9 ++++++++ arch/riscv/kernel/suspend.c | 43 ++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-)
arch/riscv/Kconfig +4 -1
@@ -63,7 +63,7 @@ config RISCV select CLINT_TIMER if !MMU select CLONE_BACKWARDS select COMMON_CLK - select CPU_PM if CPU_IDLE || HIBERNATION + select CPU_PM if CPU_IDLE || HIBERNATION || SUSPEND select EDAC_SUPPORT select FRAME_POINTER if PERF_EVENTS || (FUNCTION_TRACER && !DYNAMIC_FTRACE) select GENERIC_ARCH_TOPOLOGY
@@ -900,6 +900,9 @@ config PORTABLE select MMU select OF +config ARCH_SUSPEND_POSSIBLE + def_bool RISCV_SBI + menu "Power management options" source "kernel/power/Kconfig"
arch/riscv/include/asm/sbi.h +9 -0
@@ -29,6 +29,7 @@ enum sbi_ext_id {SBI_EXT_RFENCE =0x52464E43 ,SBI_EXT_HSM =0x48534D ,SBI_EXT_SRST =0x53525354 , +SBI_EXT_SUSP =0x53555350 , SBI_EXT_PMU = 0x504D55,/* Experimentals extensions must lie within this range */
@@ -113,6 +114,14 @@ enum sbi_srst_reset_reason { SBI_SRST_RESET_REASON_SYS_FAILURE, }; +enum sbi_ext_susp_fid { +SBI_EXT_SUSP_SYSTEM_SUSPEND =0 , +}; + +enum sbi_ext_susp_sleep_type { +SBI_SUSP_SLEEP_TYPE_SUSPEND_TO_RAM =0 , +}; +enum sbi_ext_pmu_fid {SBI_EXT_PMU_NUM_COUNTERS =0 ,SBI_EXT_PMU_COUNTER_GET_INFO ,
arch/riscv/kernel/suspend.c +43 -0
54 lines not on this page · raw message
Signature · 7 lines
2.41.0 _______________________________________________ linux-riscv mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
Yo,
arch/riscv/kernel/suspend.c int cpu_suspend(unsigned long arg, · line 120
Quoted 12 lines · Andrew Jones
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with
CONFIG_SUSPEND, one can do 'echo mem >/sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.Signed-off-by Andrew Jones <[email protected]>arch/riscv/kernel/suspend.c +3
-0+static int __init sbi_system_suspend_init (void ) +{ +if (!sbi_spec_is_0_1 () &&sbi_probe_extension (SBI_EXT_SUSP ) >0 ) {
Random thought I had reading this, was that it'll be possible to have a firmware that implements SBI < 2.0 that provides the SUSP extension. FWIW, I don't think that that is problematic, but maybe I am missing something that would make it so.
Cheers,
Conor.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
Quoted 12 lines · Conor Dooley
Yo,
Quoted 8 lines · Andrew Jones
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with
CONFIG_SUSPEND, one can do 'echo mem >/sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.Signed-off-by Andrew Jones <[email protected]>
Quoted 8 lines
arch/riscv/kernel/suspend.c int cpu_suspend(unsigned long arg, · line 120
Quoted 3 lines
arch/riscv/kernel/suspend.c +3
-0+static int __init sbi_system_suspend_init (void ) +{ +if (!sbi_spec_is_0_1 () &&sbi_probe_extension (SBI_EXT_SUSP ) >0 ) {Random thought I had reading this, was that it'll be possible to have a firmware that implements SBI < 2.0 that provides the SUSP extension. FWIW, I don't think that that is problematic, but maybe I am missing something that would make it so.
Hmm, next patch I look at is from Anup's debug console series, and he does check that the SBI implementation is at least version 2.0 before probing for the extension. We should probably have the same policy everywhere.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
In reply to Conor DooleyQuoted 12 lines · Conor Dooley
Yo,
Quoted 8 lines · Andrew Jones
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with
CONFIG_SUSPEND, one can do 'echo mem >/sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.Signed-off-by Andrew Jones <[email protected]>
Quoted 8 lines
arch/riscv/kernel/suspend.c int cpu_suspend(unsigned long arg, · line 120
Quoted 3 lines
arch/riscv/kernel/suspend.c +3
-0+static int __init sbi_system_suspend_init (void ) +{ +if (!sbi_spec_is_0_1 () &&sbi_probe_extension (SBI_EXT_SUSP ) >0 ) {Random thought I had reading this, was that it'll be possible to have a firmware that implements SBI < 2.0 that provides the SUSP extension. FWIW, I don't think that that is problematic, but maybe I am missing something that would make it so.
Right, it shouldn't matter for SUSP. In fact, I sort of wish SBI was extension probing only (no version checks), but Anup tells me that PMU requires also checking the version to know which functions are available.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
In reply to Conor DooleyQuoted 22 lines · Conor Dooley
Quoted 12 lines · Conor Dooley
Yo,
Quoted 8 lines · Andrew Jones
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with
CONFIG_SUSPEND, one can do 'echo mem >/sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.Signed-off-by Andrew Jones <[email protected]>Quoted 8 lines
arch/riscv/kernel/suspend.c int cpu_suspend(unsigned long arg, · line 120
Quoted 3 lines
arch/riscv/kernel/suspend.c +3
-0+static int __init sbi_system_suspend_init (void ) +{ +if (!sbi_spec_is_0_1 () &&sbi_probe_extension (SBI_EXT_SUSP ) >0 ) {Random thought I had reading this, was that it'll be possible to have a firmware that implements SBI < 2.0 that provides the SUSP extension. FWIW, I don't think that that is problematic, but maybe I am missing something that would make it so.
Quoted 4 lines
Hmm, next patch I look at is from Anup's debug console series, and he does check that the SBI implementation is at least version 2.0 before probing for the extension. We should probably have the same policy everywhere.
Yeah, the main reason I wrote in the other response that I'd prefer not to always check version when probing is because in most (I think all except PMU) cases it would only reduce the platforms where the extension can be used, but without any reason to do so. For example, right now QEMU bundles an OpenSBI v1.3.1 binary and that version supports both SUSP and DBCN, but, if we were to add SBI 2.0 checks in Linux for those extensions, then users will need to update their SBI implementations in order to use them. While requiring users to update their SBI implementations makes sense for new functionality or fixes, it seems like a lot to ask for them to just get a bigger number in their version check.
(And then there's downstream SBI implementations which may end up cherry picking extensions, so their version numbers would be hard to define.)
So my vote for Linux policy would be to only do version checks when necessary. And my preference for SBI would be to try and avoid specifying extensions which require clients to check versions.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
Quoted 40 lines · Andrew Jones
Quoted 22 lines · Conor Dooley
Quoted 12 lines · Conor Dooley
Yo,
Quoted 8 lines · Andrew Jones
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with
CONFIG_SUSPEND, one can do 'echo mem >/sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.Signed-off-by Andrew Jones <[email protected]>Quoted 8 lines
arch/riscv/kernel/suspend.c int cpu_suspend(unsigned long arg, · line 120
Quoted 3 lines
arch/riscv/kernel/suspend.c +3
-0+static int __init sbi_system_suspend_init (void ) +{ +if (!sbi_spec_is_0_1 () &&sbi_probe_extension (SBI_EXT_SUSP ) >0 ) {Random thought I had reading this, was that it'll be possible to have a firmware that implements SBI < 2.0 that provides the SUSP extension. FWIW, I don't think that that is problematic, but maybe I am missing something that would make it so.
Quoted 4 lines
Hmm, next patch I look at is from Anup's debug console series, and he does check that the SBI implementation is at least version 2.0 before probing for the extension. We should probably have the same policy everywhere.
Yeah, the main reason I wrote in the other response that I'd prefer not to always check version when probing is because in most (I think all except PMU) cases it would only reduce the platforms where the extension can be used, but without any reason to do so. For example, right now QEMU bundles an OpenSBI v1.3.1 binary and that version supports both SUSP and DBCN, but, if we were to add SBI 2.0 checks in Linux for those extensions, then users will need to update their SBI implementations in order to use them. While requiring users to update their SBI implementations makes sense for new functionality or fixes, it seems like a lot to ask for them to just get a bigger number in their version check.
Quoted 6 lines
(And then there's downstream SBI implementations which may end up cherry picking extensions, so their version numbers would be hard to define.)
So my vote for Linux policy would be to only do version checks when necessary. And my preference for SBI would be to try and avoid specifying extensions which require clients to check versions.
In addition to SBI PMU, even SBI STA and SBI NACL requires spec version check because these new SBI extensions use SBI_ERR_NO_SHMEM error code which is not available in SBI v1.0 (or lower).
My recommendation is that SBI implementation should comply with the minimum SBI spec version required by the SBI extensions which it implements.
Regards,
Anup
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
Quoted 44 lines · Anup Patel
Quoted 43 lines · Andrew Jones
Quoted 22 lines · Conor Dooley
Quoted 12 lines · Conor Dooley
Yo,
Quoted 8 lines · Andrew Jones
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with
CONFIG_SUSPEND, one can do 'echo mem >/sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.Signed-off-by Andrew Jones <[email protected]>Quoted 8 lines
arch/riscv/kernel/suspend.c int cpu_suspend(unsigned long arg, · line 120
Quoted 3 lines
arch/riscv/kernel/suspend.c +3
-0+static int __init sbi_system_suspend_init (void ) +{ +if (!sbi_spec_is_0_1 () &&sbi_probe_extension (SBI_EXT_SUSP ) >0 ) {Random thought I had reading this, was that it'll be possible to have a firmware that implements SBI < 2.0 that provides the SUSP extension. FWIW, I don't think that that is problematic, but maybe I am missing something that would make it so.
Quoted 4 lines
Hmm, next patch I look at is from Anup's debug console series, and he does check that the SBI implementation is at least version 2.0 before probing for the extension. We should probably have the same policy everywhere.
Yeah, the main reason I wrote in the other response that I'd prefer not to always check version when probing is because in most (I think all except PMU) cases it would only reduce the platforms where the extension can be used, but without any reason to do so. For example, right now QEMU bundles an OpenSBI v1.3.1 binary and that version supports both SUSP and DBCN, but, if we were to add SBI 2.0 checks in Linux for those extensions, then users will need to update their SBI implementations in order to use them. While requiring users to update their SBI implementations makes sense for new functionality or fixes, it seems like a lot to ask for them to just get a bigger number in their version check.
(And then there's downstream SBI implementations which may end up cherry picking extensions, so their version numbers would be hard to define.)
Quoted 7 lines
Quoted 3 lines
So my vote for Linux policy would be to only do version checks when necessary. And my preference for SBI would be to try and avoid specifying extensions which require clients to check versions.
In addition to SBI PMU, even SBI STA and SBI NACL requires spec version check because these new SBI extensions use
SBI_ERR_NO_SHMEMerror code which is not available in SBI v1.0 (or lower).
But when those extensions are present, they must implement their specifications, which means SBI_ERR_NO_SHMEM must also be present. From a client's perspective getting an affirmative that the extension is present is enough. Also checking the SBI version is basically turning the client into an SBI implementation sanity checker.
Quoted 5 lines
My recommendation is that SBI implementation should comply with the minimum SBI spec version required by the SBI extensions which it implements.
I agree, but SBI implementation versions don't get bumped until after spec freezes, even though they incorporate everything needed for the new extensions and the extensions themselves.
Linux can certainly choose to be strict about the SBI implementations from which it enables extensions, but I'm still not sure it's necessary.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
In reply to Andrew JonesQuoted 7 lines · Andrew Jones
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with
CONFIG_SUSPEND, one can do 'echo mem >/sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.
Quoted 6 lines
Signed-off-by Andrew Jones <[email protected]>--- arch/riscv/Kconfig | 5 ++++- arch/riscv/include/asm/sbi.h | 9 ++++++++ arch/riscv/kernel/suspend.c | 43 ++++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-)
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
In reply to Andrew JonesQuoted 65 lines · Andrew Jones
Quoted 44 lines · Anup Patel
Quoted 43 lines · Andrew Jones
Quoted 22 lines · Conor Dooley
Quoted 12 lines · Conor Dooley
Yo,
Quoted 8 lines · Andrew Jones
When the SUSP SBI extension is present it implies that the standard "suspend to RAM" type is available. Wire it up to the generic platform suspend support, also applying the already present support for non-retentive CPU suspend. When the kernel is built with
CONFIG_SUSPEND, one can do 'echo mem >/sys/power/state' to suspend. Resumption will occur when a platform-specific wake-up event arrives.Signed-off-by Andrew Jones <[email protected]>Quoted 8 lines
arch/riscv/kernel/suspend.c int cpu_suspend(unsigned long arg, · line 120
Quoted 3 lines
arch/riscv/kernel/suspend.c +3
-0+static int __init sbi_system_suspend_init (void ) +{ +if (!sbi_spec_is_0_1 () &&sbi_probe_extension (SBI_EXT_SUSP ) >0 ) {Random thought I had reading this, was that it'll be possible to have a firmware that implements SBI < 2.0 that provides the SUSP extension. FWIW, I don't think that that is problematic, but maybe I am missing something that would make it so.
Quoted 4 lines
Hmm, next patch I look at is from Anup's debug console series, and he does check that the SBI implementation is at least version 2.0 before probing for the extension. We should probably have the same policy everywhere.
Yeah, the main reason I wrote in the other response that I'd prefer not to always check version when probing is because in most (I think all except PMU) cases it would only reduce the platforms where the extension can be used, but without any reason to do so. For example, right now QEMU bundles an OpenSBI v1.3.1 binary and that version supports both SUSP and DBCN, but, if we were to add SBI 2.0 checks in Linux for those extensions, then users will need to update their SBI implementations in order to use them. While requiring users to update their SBI implementations makes sense for new functionality or fixes, it seems like a lot to ask for them to just get a bigger number in their version check.
(And then there's downstream SBI implementations which may end up cherry picking extensions, so their version numbers would be hard to define.)
Quoted 7 lines
Quoted 3 lines
So my vote for Linux policy would be to only do version checks when necessary. And my preference for SBI would be to try and avoid specifying extensions which require clients to check versions.
In addition to SBI PMU, even SBI STA and SBI NACL requires spec version check because these new SBI extensions use
SBI_ERR_NO_SHMEMerror code which is not available in SBI v1.0 (or lower).But when those extensions are present, they must implement their specifications, which means
SBI_ERR_NO_SHMEMmust also be present. From a client's perspective getting an affirmative that the extension is present is enough. Also checking the SBI version is basically turning the client into an SBI implementation sanity checker.Quoted 5 lines
My recommendation is that SBI implementation should comply with the minimum SBI spec version required by the SBI extensions which it implements.
Quoted 7 lines
I agree, but SBI implementation versions don't get bumped until after spec freezes, even though they incorporate everything needed for the new extensions and the extensions themselves.
Linux can certainly choose to be strict about the SBI implementations from which it enables extensions, but I'm still not sure it's necessary.
I was just reviewing the DBCN series and was about to raise my thoughts there again about not being so strict about SBI implementation versions, but then I thought some more about it. I guess we should be strict about the version since it's otherwise not possible to any confidence that the extension advertised is the extension described in the frozen/ratified version of the spec (there could be implementations of draft spec versions which are not compatible with the final version and those will have the same extension ID). The most confidence Linux can have in an SBI extension's implementation being what it expects to be will come from both the extension's presence and the SBI implementation's version being at least as big as the version in which the extension was frozen.
Long story short, I'll change the above condition to look for 2.0 and ask QEMU folks to put an OpenSBI binary which advertises 2.0 into its repo as soon as possible.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Re: [PATCH v1 1/1] riscv: sbi: Introduce system suspend support
Hey Drew, Anup,
Quoted 8 lines · Andrew Jones
I was just reviewing the DBCN series and was about to raise my thoughts there again about not being so strict about SBI implementation versions, but then I thought some more about it. I guess we should be strict about the version since it's otherwise not possible to any confidence that the extension advertised is the extension described in the frozen/ratified version of the spec (there could be implementations of draft spec versions which are not compatible with the final version and those will have the same extension ID).
TBH, I don't think that having the version check is a sufficient test to stop things like that happening, but being insufficient does not make it not worthwhile.
Quoted 4 lines
The most confidence Linux can have in an SBI
extension's implementation being what it expects to be will come from both the extension's presence and the SBI implementation's version being at least as big as the version in which the extension was frozen.
I am not sure what the status of the patches are on the OpenSBI side, but this is kinda how I feel about the Andestech PMU series. They're intending advertising having the PMU extension using the same interface as the standard PMU stuff - at least, that is the basis on which the kernel patches worked. The software doing the ecall to probe for support does really need to be able to trust that when it is told the extension is present that it is in fact the standard, or at least standard-compatible, extension.
<[email protected]> is the OpenSBI series implementing this and I voiced my objection to the kernel patches at
https://lore.kernel.org/linux-riscv/20230911-worry-reformat-fbb5c473085d@wendy
Quoted 3 lines
Long story short, I'll change the above condition to look for 2.0 and ask QEMU folks to put an OpenSBI binary which advertises 2.0 into its repo as soon as possible.
Cool, thanks.
BTW Anup, do you think we could get the OpenSBI mailing lists archived on lore.kernel.org?
Cheers,
Conor.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 17 lines · Andrew Jones
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 addopensbi-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.
Quoted 7 lines
Note: Resume may fail without the fix for probing misaligned access speed[1]. It's best to apply that fix before attempting system suspend.
[1] https://lore.kernel.org/all/[email protected]/
Changes for v1:
- Rebase on v6.6-rc1 -- only minorKconfigchange needed
Would you mind resending this rebased on -rc1 again? It looks as if the patchwork CI threw a fit do to differing expectations about function signatures for the misaligned access probing.
Cheers,
Conor.
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv
Quoted 21 lines · Conor Dooley
Quoted 20 lines · Andrew Jones
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 addopensbi-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.
Note: Resume may fail without the fix for probing misaligned access speed[1]. It's best to apply that fix before attempting system suspend.
Quoted 8 lines
Quoted 4 lines
[1] https://lore.kernel.org/all/[email protected]/
Changes for v1:
- Rebase on v6.6-rc1 -- only minorKconfigchange neededWould you mind resending this rebased on -rc1 again? It looks as if the patchwork CI threw a fit do to differing expectations about function signatures for the misaligned access probing.
Thanks for the poke. I need to repost anyway with the improved condition, checking the SBI version. I'll try to get to this today.
Thanks,
drew
_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv