]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
powernv/kdump: Fix cases where the kdump kernel can get HMI's
authorBalbir Singh <bsingharora@gmail.com>
Fri, 30 Mar 2018 19:44:29 +0000 (15:44 -0400)
committerSeth Forshee <seth.forshee@canonical.com>
Fri, 30 Mar 2018 19:51:18 +0000 (14:51 -0500)
commitc65feaa23b5015b05dd4cd7cc2780970aecfd0d9
tree6fc0cf0b26bbd302de39309a4175bd67c207b0e4
parent4f61bcf79137d7610ef1c0dfcbffe86ebfee7346
powernv/kdump: Fix cases where the kdump kernel can get HMI's

BugLink: http://bugs.launchpad.net/bugs/1758206
Certain HMI's such as malfunction error propagate through
all threads/core on the system. If a thread was offline
prior to us crashing the system and jumping to the kdump
kernel, bad things happen when it wakes up due to an HMI
in the kdump kernel.

There are several possible ways to solve this problem

1. Put the offline cores in a state such that they are
not woken up for machine check and HMI errors. This
does not work, since we might need to wake up offline
threads to handle TB errors
2. Ignore HMI errors, setup HMEER to mask HMI errors,
but this still leads the window open for any MCEs
and masking them for the duration of the dump might
be a concern
3. Wake up offline CPUs, as in send them to
crash_ipi_callback (not wake them up as in mark them
online as seen by the hotplug). kexec does a
wake_online_cpus() call, this patch does something
similar, but instead sends an IPI and forces them to
crash_ipi_callback()

This patch takes approach #3.

Care is taken to enable this only for powenv platforms
via crash_wake_offline (a global value set at setup
time). The crash code sends out IPI's to all CPU's
which then move to crash_ipi_callback and kexec_smp_wait().

Signed-off-by: Balbir Singh <bsingharora@gmail.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 4145f358644b970fcff293c09fdcc7939e8527d2)
Signed-off-by: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
arch/powerpc/include/asm/kexec.h
arch/powerpc/kernel/crash.c
arch/powerpc/kernel/smp.c
arch/powerpc/platforms/powernv/smp.c