]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
MIPS: Fix crash registers on non-crashing CPUs
authorCorey Minyard <cminyard@mvista.com>
Mon, 11 Apr 2016 14:10:19 +0000 (09:10 -0500)
committerRalf Baechle <ralf@linux-mips.org>
Mon, 9 May 2016 10:00:00 +0000 (12:00 +0200)
commitc80e1b62ffca52e2d1d865ee58bc79c4c0c55005
treeb9c19e7bec9ad21e82f17cf9bb24e4e8a4273594
parente03ac9f0c3f5f2e79c41fd02d9b90831dfd78a2e
MIPS: Fix crash registers on non-crashing CPUs

As part of handling a crash on an SMP system, an IPI is send to
all other CPUs to save their current registers and stop.  It was
using task_pt_regs(current) to get the registers, but that will
only be accurate if the CPU was interrupted running in userland.
Instead allow the architecture to pass in the registers (all
pass NULL now, but allow for the future) and then use get_irq_regs()
which should be accurate as we are in an interrupt.  Fall back to
task_pt_regs(current) if nothing else is available.

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13050/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/kernel/crash.c