powerpc/32s: Fix RTAS machine check with VMAP stack
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Wed, 13 Jan 2021 06:40:20 +0000 (06:40 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 17 Jan 2021 13:16:52 +0000 (14:16 +0100)
commitbca9ca5a603f6c5586a7dfd35e06abe6d5fcd559
tree47508ecf5740026c7bb126f5964cd421d8609101
parent659361086d8b2ee2c8318f390029a350a6e7fb61
powerpc/32s: Fix RTAS machine check with VMAP stack

[ Upstream commit 98bf2d3f4970179c702ef64db658e0553bc6ef3a ]

When we have VMAP stack, exception prolog 1 sets r1, not r11.

When it is not an RTAS machine check, don't trash r1 because it is
needed by prolog 1.

Fixes: da7bb43ab9da ("powerpc/32: Fix vmap stack - Properly set r1 before activating MMU")
Fixes: d2e006036082 ("powerpc/32: Use SPRN_SPRG_SCRATCH2 in exception prologs")
Cc: stable@vger.kernel.org # v5.10+
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
[mpe: Squash in fixup for RTAS machine check from Christophe]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/bc77d61d1c18940e456a2dee464f1e2eda65a3f0.1608621048.git.christophe.leroy@csgroup.eu
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/powerpc/kernel/head_book3s_32.S