]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powerpc/64s/exception: machine check use correct cfar for late handler
authorNicholas Piggin <npiggin@gmail.com>
Fri, 2 Aug 2019 10:56:32 +0000 (20:56 +1000)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 16 Oct 2019 09:55:42 +0000 (11:55 +0200)
commitc4903bea24d5704e37af7883de54fe8cf74f4f53
tree401a9c8f94e3ef9e4bd0e7b93be8b1c3e49ca80c
parentaf4f596ab0b1419cf11dc6a43500045c606125b7
powerpc/64s/exception: machine check use correct cfar for late handler

BugLink: https://bugs.launchpad.net/bugs/1848274
[ Upstream commit 0b66370c61fcf5fcc1d6901013e110284da6e2bb ]

Bare metal machine checks run an "early" handler in real mode before
running the main handler which reports the event.

The main handler runs exactly as a normal interrupt handler, after the
"windup" which sets registers back as they were at interrupt entry.
CFAR does not get restored by the windup code, so that will be wrong
when the handler is run.

Restore the CFAR to the saved value before running the late handler.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20190802105709.27696-8-npiggin@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/powerpc/kernel/exceptions-64s.S