Skip to contentSkip to conversation

xen/common: Drop unnecessary #ifdef CONFIG_KEXEC

PATCH In review Andrew Cooper 2 participants 2 messages Nov 21, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xen/common: Drop unnecessary #ifdef CONFIG_KEXEC

kexec.h itself has suitable stubs for the !CONFIG_KEXEC case, so calls to kexec_crash() don't need guarding.

---
CC: George Dunlap <[email protected]>
CC: Jan Beulich <[email protected]>
CC: Konrad Rzeszutek Wilk <[email protected]>
CC: Stefano Stabellini <[email protected]>
CC: Tim Deegan <[email protected]>
CC: Wei Liu <[email protected]>
CC: Julien Grall <[email protected]>

---
 xen/common/shutdown.c      | 6 ------
 xen/drivers/char/console.c | 2 --
 2 files changed, 8 deletions(-)
xen/common/shutdown.c +0 -6
index 009a70c..2ed4d62 100644
@@ -6,9 +6,7 @@
 #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>
 
@@ -44,9 +42,7 @@ void hwdom_shutdown(u8 reason)
     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 */
 
@@ -59,9 +55,7 @@ void hwdom_shutdown(u8 reason)
     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 */
 
xen/drivers/char/console.c +0 -2
index f39a37e..675193a 100644
@@ -1338,9 +1338,7 @@ void panic(const char *fmt, ...)
 
     debugger_trap_immediate();
 
-#ifdef CONFIG_KEXEC
     kexec_crash();
-#endif
 
     if ( opt_noreboot )
         machine_halt();
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel