powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 8 Dec 2020 05:24:19 +0000 (05:24 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 8 Dec 2020 10:41:03 +0000 (21:41 +1100)
commitdb972a3787d12b1ce9ba7a31ec376d8a79e04c47
tree3979e49aa785c54ad672e758bf496ef07dd3748e
parentf8a4b277c3cf39ec8efe50114924a7743cc84800
powerpc/powermac: Fix low_sleep_handler with CONFIG_VMAP_STACK

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.

Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK")
Reported-by: Giuseppe Sacco <giuseppe@sguazz.it>
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Tested-by: Giuseppe Sacco <giuseppe@sguazz.it>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/e3e0d8042a3ba75cb4a9546c19c408b5b5b28994.1607404931.git.christophe.leroy@csgroup.eu
arch/powerpc/platforms/Kconfig.cputype
arch/powerpc/platforms/powermac/sleep.S