2023-08-02 12:14:20

by Conor Dooley

[permalink] [raw]
Subject: [RFT 0/2] RISC-V: handle missing "no-map" properties for OpenSBI's PMP protected regions

Hey folks,

I was kinda sitting around hoping that someone who cared about
hibernation would decide to go and work on some patches that permitted
using it without having to use NONPORTABLE, but that has not yet
happened so here I am.

I've marked this RFT as I have not got a setup to test hibernation on a
system that suffers from the OpenSBI issue, nor have I used crash
kernels at all.

Thanks,
Conor.

CC: Paul Walmsley <[email protected]>
CC: Palmer Dabbelt <[email protected]>
CC: Atish Patra <[email protected]>
CC: Anup Patel <[email protected]>
CC: Conor Dooley <[email protected]>
CC: Alexandre Ghiti <[email protected]>
CC: Björn Töpel <[email protected]>
CC: Song Shuai <[email protected]>
CC: JeeHeng Sia <[email protected]>
CC: Petr Tesarik <[email protected]>
CC: [email protected]
CC: [email protected]

Conor Dooley (2):
RISC-V: handle missing "no-map" properties for OpenSBI's PMP protected
regions
Revert "RISC-V: mark hibernation as nonportable"

arch/riscv/Kconfig | 5 +----
arch/riscv/include/asm/sbi.h | 5 +++++
arch/riscv/kernel/sbi.c | 42 +++++++++++++++++++++++++++++++++++-
arch/riscv/mm/init.c | 3 +++
4 files changed, 50 insertions(+), 5 deletions(-)

--
2.40.1



2023-08-02 13:27:27

by Conor Dooley

[permalink] [raw]
Subject: [RFT 2/2] Revert "RISC-V: mark hibernation as nonportable"

Revert commit ed309ce52218 ("RISC-V: mark hibernation as nonportable")
as the kernel now has a way to handle the "no-map"-less, PMP protected,
reserved memory nodes for the affected versions of OpenSBI.

Signed-off-by: Conor Dooley <[email protected]>
---
arch/riscv/Kconfig | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index 4c07b9189c86..47aef21073f9 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -866,11 +866,8 @@ menu "Power management options"

source "kernel/power/Kconfig"

-# Hibernation is only possible on systems where the SBI implementation has
-# marked its reserved memory as not accessible from, or does not run
-# from the same memory as, Linux
config ARCH_HIBERNATION_POSSIBLE
- def_bool NONPORTABLE
+ def_bool y

config ARCH_HIBERNATION_HEADER
def_bool HIBERNATION
--
2.40.1


Subject: Re: [RFT 0/2] RISC-V: handle missing "no-map" properties for OpenSBI's PMP protected regions

Hello:

This series was applied to riscv/linux.git (for-next)
by Palmer Dabbelt <[email protected]>:

On Wed, 2 Aug 2023 12:12:51 +0100 you wrote:
> Hey folks,
>
> I was kinda sitting around hoping that someone who cared about
> hibernation would decide to go and work on some patches that permitted
> using it without having to use NONPORTABLE, but that has not yet
> happened so here I am.
>
> [...]

Here is the summary with links:
- [RFT,1/2] RISC-V: handle missing "no-map" properties for OpenSBI's PMP protected regions
(no matching commit)
- [RFT,2/2] Revert "RISC-V: mark hibernation as nonportable"
https://git.kernel.org/riscv/c/e2d6b54b935a

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html