x86/platform/uv: Implement simple dump failover if kdump fails
x86/platform/uv: Implement simple dump failover if kdump fails

The ability to trigger a kdump using the system NMI command
was added by

    commit 12ba6c990fab ("x86/UV: Add kdump to UV NMI handler")
    Author: Mike Travis <e6cc0fb2b8dad4110ef62e9a33e5a8aa4e0f86d7@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: Mike Travis <e6cc0fb2b8dad4110ef62e9a33e5a8aa4e0f86d7@sgi.com>
Signed-off-by: George Beshers <c2535cc88c3b1b2d2091070460cffbdde6278c0d@sgi.com>
Cc: Alex Thorlton <5bbb8392bf4c83c8df4592d042418f980ab3efda@sgi.com>
Cc: Dimitri Sivanich <eb9314cd9fb6c9c1ab10792809da7e2f4af25acd@sgi.com>
Cc: Hedi Berriche <e4a37f39837f34802ddf825db7fff764be6d206d@sgi.com>
Cc: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
Cc: Peter Zijlstra <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Russ Anderson <b201cce1c41ebc015324acfd842117e19cbd0c5e@sgi.com>
Cc: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>
Cc: 2578944098299abf708b08eff6fcf60565553586@vger.kernel.org
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs