• Corey Minyard's avatar
    MIPS: Fix crash registers on non-crashing CPUs · c80e1b62
    Corey Minyard authored
    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: default avatarCorey 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: default avatarRalf Baechle <ralf@linux-mips.org>
    c80e1b62
crash.c 1.99 KB