]> xenbits.xensource.com Git - xen.git/commitdiff
xen/shutdown: Fix build issue with shutdown.h on PowerPC
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 5 Jul 2024 17:59:24 +0000 (18:59 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 22 Jul 2024 09:50:03 +0000 (10:50 +0100)
The use of bool needs xen/types.h, which shutdown.h picks up by chance in all
other architectures.

While fixing this, swap u8 for unsigned char in hwdom_shutdown(), and move
opt_noreboot into __ro_after_init.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/shutdown.c
xen/include/xen/shutdown.h

index f413f331af1717d68b4ba453bd15937cfef0b0fd..c47341b97764adeb8f4b75b8f1f16b7ec88894ad 100644 (file)
@@ -12,7 +12,7 @@
 #include <public/sched.h>
 
 /* opt_noreboot: If true, machine will need manual reset on error. */
-bool __read_mostly opt_noreboot;
+bool __ro_after_init opt_noreboot;
 boolean_param("noreboot", opt_noreboot);
 
 static void noreturn reboot_or_halt(void)
@@ -30,7 +30,7 @@ static void noreturn reboot_or_halt(void)
     }
 }
 
-void hwdom_shutdown(u8 reason)
+void hwdom_shutdown(unsigned char reason)
 {
     switch ( reason )
     {
index 668aed0be580e352cfd09f62ded8cd8e2671b425..c7fa23aec1fe32917daef9b0667a8b1cd13497bf 100644 (file)
@@ -2,11 +2,12 @@
 #define __XEN_SHUTDOWN_H__
 
 #include <xen/compiler.h>
+#include <xen/types.h>
 
 /* opt_noreboot: If true, machine will need manual reset on error. */
 extern bool opt_noreboot;
 
-void noreturn hwdom_shutdown(u8 reason);
+void noreturn hwdom_shutdown(unsigned char reason);
 
 void noreturn machine_restart(unsigned int delay_millisecs);
 void noreturn machine_halt(void);