Re: [PATCH v2] powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK
From: Giuseppe Sacco <hidden>
Date: 2020-12-08 09:00:08
Also in:
lkml
Hello Christophe, Il giorno mar, 08/12/2020 alle 05.24 +0000, Christophe Leroy ha scritto:
low_sleep_handler() can't restore the context from standard
stack because the stack can hardly be accessed with MMU OFF.
Store everything in a global storage area instead of storing
a pointer to the stack in that global storage area.
To avoid a complete churn of the function, still use r1 as
the pointer to the storage area during restore.
Reported-by: Giuseppe Sacco <redacted>
Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK")
Signed-off-by: Christophe Leroy <redacted>
---
This is only build tested. Giuseppe can you test it ? Thanks.
v2: Changed an erroneous 'addis' to 'addi' ; Using bss instead of
data section
Signed-off-by: Christophe Leroy <redacted>
---
arch/powerpc/platforms/Kconfig.cputype | 2 +-
arch/powerpc/platforms/powermac/sleep.S | 132 +++++++++++-----------
--
2 files changed, 60 insertions(+), 74 deletions(-)[...] I just tested the v2 patch against latest kernel. Please note that yesterday patch was on a kernel named 5.10.0-rc6+, while today's patch is on a kernel named 5.10.0-rc7+. Even with the latest kernel updates, the patch apply correctly and machine boots normally, fixing the problem. $ uname -a Linux titanium4 5.10.0-rc7+ #3 Tue Dec 8 09:11:20 CET 2020 ppc GNU/Linux $ grep VMAP /boot/config-5.10.0-rc7+ CONFIG_HAVE_ARCH_VMAP_STACK=y CONFIG_VMAP_STACK=y Thank you again. Bye, Giuseppe