• Mike Travis's avatar
    x86/platform/uv: Implement simple dump failover if kdump fails · d0a9964e
    Mike Travis authored
    The ability to trigger a kdump using the system NMI command
    was added by
    
        commit 12ba6c99 ("x86/UV: Add kdump to UV NMI handler")
        Author: Mike Travis <travis@sgi.com>
        Date:   Mon Sep 23 16:25:03 2013 -0500
    
    This is useful because when kdump is working the information
    gathered is more informative than the original per CPU stack
    traces or "dump" option.  However a number of things can go
    wrong with kdump and then the stack traces are more useful than
    nothing.
    
    The two most common reasons for kdump to not be available are:
    
      1) if a problem occurs during boot before the kdump service is
         started, or
      2) the kdump daemon failed to start.
    
    In either case the call to crash_kexec() returns unexpectedly.
    
    When this happens uv_nmi_kdump() also sets the
    uv_nmi_kexec_failed flag which causes the slave CPU's to also
    return to the NMI handler. Upon this unexpected return to the
    NMI handler, the NMI handler will revert to the "dump" action
    which uses show_regs() to obtain a process trace dump for all
    the CPU's.
    
    Other minor changes:
        The "dump" action now generates both the show_regs() stack trace
        and show instruction pointer information.  Whereas the "ips"
        action only shows instruction pointers for non-idle CPU's.  This
        is more like an abbreviated "ps" display.
    
        Change printk(KERN_DEFAULT...) --> pr_info()
    Signed-off-by: default avatarMike Travis <travis@sgi.com>
    Signed-off-by: default avatarGeorge Beshers <gbeshers@sgi.com>
    Cc: Alex Thorlton <athorlton@sgi.com>
    Cc: Dimitri Sivanich <sivanich@sgi.com>
    Cc: Hedi Berriche <hedi@sgi.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Russ Anderson <rja@sgi.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
    d0a9964e
uv_nmi.c 18.7 KB