]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/32s: fix suspend/resume when IBATs 4-7 are used
authorChristophe Leroy <christophe.leroy@c-s.fr>
Mon, 17 Jun 2019 21:42:14 +0000 (21:42 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 19 Jun 2019 10:05:07 +0000 (20:05 +1000)
commit09e145846cc2b72c8e5962211a2614cc2d1b341f
treea5109e328f20f64875532139afa527abef650e8d
parent170004aa187a37a97b7c7db319e4e01edd1446d1
powerpc/32s: fix suspend/resume when IBATs 4-7 are used

Previously, only IBAT1 and IBAT2 were used to map kernel linear mem.
Since commit e9a9bd9f1407 ("powerpc/mm/32s: Use BATs for
STRICT_KERNEL_RWX"), we may have all 8 BATs used for mapping
kernel text. But the suspend/restore functions only save/restore
BATs 0 to 3, and clears BATs 4 to 7.

Make suspend and restore functions respectively save and reload
the 8 BATs on CPUs having MMU_FTR_USE_HIGH_BATS feature.

Reported-by: Andreas Schwab <schwab@linux-m68k.org>
Cc: stable@vger.kernel.org
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/swsusp_32.S
arch/powerpc/platforms/powermac/sleep.S