Skip to contentSkip to conversation

ARM: kexec: record parent context registers for non-crash CPUs

PATCH New Russell King 1 participant 1 message Apr 12, 2018 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 ARM: kexec: record parent context registers for non-crash CPUs

How we got to machine_crash_nonpanic_core() (iow, from an IPI, etc) is not interesting for debugging a crash. The more interesting context is the parent context prior to the IPI being received.

Record the parent context register state rather than the register state in machine_crash_nonpanic_core(), which is more relevant to the failing condition.

---
 arch/arm/kernel/machine_kexec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/kernel/machine_kexec.c +1 -1
index 39dc6bf4610a..43918872b783 100644
@@ -83,7 +83,7 @@ void machine_crash_nonpanic_core(void *unused)
 {
 	struct pt_regs regs;
 
-	crash_setup_regs(&regs, NULL);
+	crash_setup_regs(&regs, get_irq_regs());
 	printk(KERN_DEBUG "CPU %u will stop doing anything useful since another CPU has crashed\n",
 	       smp_processor_id());
 	crash_save_cpu(&regs, smp_processor_id());
Signature · 1 line
2.7.4