summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/rtas-fadump.c
diff options
context:
space:
mode:
authorHari Bathini <hbathini@linux.ibm.com>2022-04-04 21:21:37 +0300
committerMichael Ellerman <mpe@ellerman.id.au>2022-04-26 15:36:57 +0300
commit6584cec0a2255ab407d047d1b135fa0aae88d6c6 (patch)
tree09e82d1823d084b5e10b68bde4be920729ce011e /arch/powerpc/platforms/pseries/rtas-fadump.c
parentb74196af372f7cb4902179009265fe63ac81824f (diff)
downloadlinux-6584cec0a2255ab407d047d1b135fa0aae88d6c6.tar.xz
powerpc/fadump: save CPU reg data in vmcore when PHYP terminates LPAR
An LPAR can be terminated by the POWER Hypervisor (PHYP) for various reasons. If FADump was configured when PHYP terminates the LPAR, platform-assisted dump is initiated to save the kernel dump. But CPU register data would not be processed/saved in the vmcore in such case because CPU mask is set in crash_fadump() at the time of kernel crash and it remains unset in this case with LPAR being terminated by PHYP abruptly. To get around the problem, initialize cpu_mask to cpu_possible_mask so as to ensure all possible CPUs' register data is processed for the vmcore generated on PHYP terminated LPAR. Also, rename the crash info member variable from online_mask to cpu_mask as it doesn't necessarily have to be online CPU mask always. Signed-off-by: Hari Bathini <hbathini@linux.ibm.com> Reviewed-by: Mahesh Salgaonkar <mahesh@linux.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20220404182137.59231-1-hbathini@linux.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/pseries/rtas-fadump.c')
-rw-r--r--arch/powerpc/platforms/pseries/rtas-fadump.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/pseries/rtas-fadump.c b/arch/powerpc/platforms/pseries/rtas-fadump.c
index 35f9cb602c30..617c0f3b1f4f 100644
--- a/arch/powerpc/platforms/pseries/rtas-fadump.c
+++ b/arch/powerpc/platforms/pseries/rtas-fadump.c
@@ -351,7 +351,7 @@ static int __init rtas_fadump_build_cpu_notes(struct fw_dump *fadump_conf)
/* Lower 4 bytes of reg_value contains logical cpu id */
cpu = (be64_to_cpu(reg_entry->reg_value) &
RTAS_FADUMP_CPU_ID_MASK);
- if (fdh && !cpumask_test_cpu(cpu, &fdh->online_mask)) {
+ if (fdh && !cpumask_test_cpu(cpu, &fdh->cpu_mask)) {
RTAS_FADUMP_SKIP_TO_NEXT_CPU(reg_entry);
continue;
}