]> git.proxmox.com Git - mirror_ubuntu-bionic-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 14 Aug 2019 09:18:49 +0000 (11:18 +0200)
commitfc871f49ae8b4b70bf136449b792e69c11035d8c
treecae562e6e209046e559e52f1661bb49ae9a64c6a
parent43d1b95773566accbffbd9d6cca8ca51a629bc4e
powerpc/32s: fix suspend/resume when IBATs 4-7 are used

BugLink: https://bugs.launchpad.net/bugs/1839036
commit 6ecb78ef56e08d2119d337ae23cb951a640dc52d upstream.

Previously, only IBAT1 and IBAT2 were used to map kernel linear mem.
Since commit 63b2bc619565 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/powerpc/kernel/swsusp_32.S
arch/powerpc/platforms/powermac/sleep.S