OSDN Git Service

powerpc/6xx: Fix power_save_ppc32_restore() with CONFIG_VMAP_STACK
authorChristophe Leroy <christophe.leroy@c-s.fr>
Fri, 14 Feb 2020 06:53:00 +0000 (06:53 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 18 Feb 2020 10:31:12 +0000 (21:31 +1100)
commit477f3488a94e35380c82a7498d46f10fa5f3edd2
tree440d25a672785bf7d01cb627ebb3c303017a7f4e
parent5a528eb67908bcf493f3583cb4726fbd8e129605
powerpc/6xx: Fix power_save_ppc32_restore() with CONFIG_VMAP_STACK

power_save_ppc32_restore() is called during exception entry, before
re-enabling the MMU. It substracts KERNELBASE from the address
of nap_save_msscr0 to access it.

With CONFIG_VMAP_STACK enabled, data MMU translation has already been
re-enabled, so power_save_ppc32_restore() has to access
nap_save_msscr0 by its virtual address.

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Fixes: cd08f109e262 ("powerpc/32s: Enable CONFIG_VMAP_STACK")
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/7bce32ccbab3ba3e3e0f27da6961bf6313df97ed.1581663140.git.christophe.leroy@c-s.fr
arch/powerpc/kernel/idle_6xx.S