kexec.h itself has suitable stubs for the !CONFIG_KEXEC case, so calls to
kexec_crash() don't need guarding.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
#include <xen/watchdog.h>
#include <xen/shutdown.h>
#include <xen/console.h>
-#ifdef CONFIG_KEXEC
#include <xen/kexec.h>
-#endif
#include <asm/debugger.h>
#include <public/sched.h>
case SHUTDOWN_crash:
debugger_trap_immediate();
printk("Hardware Dom%u crashed: ", hardware_domain->domain_id);
-#ifdef CONFIG_KEXEC
kexec_crash();
-#endif
maybe_reboot();
break; /* not reached */
case SHUTDOWN_watchdog:
printk("Hardware Dom%u shutdown: watchdog rebooting machine\n",
hardware_domain->domain_id);
-#ifdef CONFIG_KEXEC
kexec_crash();
-#endif
machine_restart(0);
break; /* not reached */
debugger_trap_immediate();
-#ifdef CONFIG_KEXEC
kexec_crash();
-#endif
if ( opt_noreboot )
machine_halt();