Message ID | 20191122182144.20633-1-minyard@acm.org (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | powerpc: Fix issue with missing registers in kdump | expand |
Context | Check | Description |
---|---|---|
snowpatch_ozlabs/apply_patch | success | Successfully applied on branch powerpc/merge (f5b8031d0193757ee977b2cee25065a4e6200615) |
snowpatch_ozlabs/build-ppc64le | success | Build succeeded |
snowpatch_ozlabs/build-ppc64be | success | Build succeeded |
snowpatch_ozlabs/build-ppc64e | success | Build succeeded |
snowpatch_ozlabs/build-pmac32 | success | Build succeeded |
snowpatch_ozlabs/checkpatch | warning | total: 0 errors, 0 warnings, 4 checks, 28 lines checked |
snowpatch_ozlabs/needsstable | success | Patch has no Fixes tags |
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c index d488311efab1..f6e345b8c33d 100644 --- a/arch/powerpc/kernel/crash.c +++ b/arch/powerpc/kernel/crash.c @@ -24,6 +24,7 @@ #include <asm/smp.h> #include <asm/setjmp.h> #include <asm/debug.h> +#include <asm/cacheflush.h> /* * The primary CPU waits a while for all secondary CPUs to enter. This is to @@ -75,8 +76,21 @@ void crash_ipi_callback(struct pt_regs *regs) hard_irq_disable(); if (!cpumask_test_cpu(cpu, &cpus_state_saved)) { + char *buf; + crash_save_cpu(regs, cpu); cpumask_set_cpu(cpu, &cpus_state_saved); + + /* + * Flush the crash note region data, otherwise the + * data gets left in the CPU cache and then + * invalidated, so the crashing cpu will never see it + * in the new kernel. + */ + buf = (char *) per_cpu_ptr(crash_notes, cpu); + if (buf) + flush_dcache_range((unsigned long) buf, + (unsigned long) buf + sizeof(note_buf_t)); } atomic_inc(&cpus_in_crash);