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

[xen master] xen/shutdown: Fix build issue with shutdown.h on PowerPC



commit 10b9589e6d4dd5e09c3d863bbebd927fe3f9beac
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Fri Jul 5 18:59:24 2024 +0100
Commit:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
CommitDate: Mon Jul 22 10:50:03 2024 +0100

    xen/shutdown: Fix build issue with shutdown.h on PowerPC
    
    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>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 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 f413f331af..c47341b977 100644
--- a/xen/common/shutdown.c
+++ b/xen/common/shutdown.c
@@ -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 )
     {
diff --git a/xen/include/xen/shutdown.h b/xen/include/xen/shutdown.h
index 668aed0be5..c7fa23aec1 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);
--
generated by git-patchbot for /home/xen/git/xen.git#master



 


Rackspace

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