[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/2] xen/shutdown: Fix build issue with shutdown.h on PPC



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@xxxxxxxxxx>
---
CC: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>
CC: Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Stefano Stabellini <sstabellini@xxxxxxxxxx>
CC: Julien Grall <julien@xxxxxxx>
---
 xen/common/shutdown.c      | 4 ++--
 xen/include/xen/shutdown.h | 3 ++-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/common/shutdown.c b/xen/common/shutdown.c
index 5f8141edc6b2..cb9c830bbc1d 100644
--- a/xen/common/shutdown.c
+++ b/xen/common/shutdown.c
@@ -11,7 +11,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)
@@ -29,7 +29,7 @@ static void noreturn reboot_or_halt(void)
     }
 }
 
-void hwdom_shutdown(u8 reason)
+void hwdom_shutdown(unsigned char reason)
 {
     switch ( reason )
     {
diff --git a/xen/include/xen/shutdown.h b/xen/include/xen/shutdown.h
index 668aed0be580..c7fa23aec1fe 100644
--- a/xen/include/xen/shutdown.h
+++ b/xen/include/xen/shutdown.h
@@ -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);
-- 
2.39.2




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.