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

[Xen-devel] [PATCH] xen/arm: Panic if platform initialization failed



Actually, if an error occurs, Xen will silently ignore it and continue.
Convert platform_init to a void function and panic if we fail to
correctly initialize the platform.

Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
---
 xen/arch/arm/platform.c        | 5 +++--
 xen/include/asm-arm/platform.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c
index db135f8..0fbbdc7 100644
--- a/xen/arch/arm/platform.c
+++ b/xen/arch/arm/platform.c
@@ -54,7 +54,7 @@ static void dump_platform_table(void)
         printk("    - %s\n", p->name);
 }
 
-int __init platform_init(void)
+void __init platform_init(void)
 {
     int res = 0;
 
@@ -82,7 +82,8 @@ int __init platform_init(void)
     if ( platform && platform->init )
         res = platform->init();
 
-    return res;
+    if ( res )
+        panic("Unable to initialize the platform\n");
 }
 
 int __init platform_init_time(void)
diff --git a/xen/include/asm-arm/platform.h b/xen/include/asm-arm/platform.h
index 43afebb..c282b30 100644
--- a/xen/include/asm-arm/platform.h
+++ b/xen/include/asm-arm/platform.h
@@ -45,7 +45,7 @@ struct platform_desc {
  */
 #define PLATFORM_QUIRK_DOM0_MAPPING_11 (1 << 0)
 
-int __init platform_init(void);
+void __init platform_init(void);
 int __init platform_init_time(void);
 int __init platform_specific_mapping(struct domain *d);
 #ifdef CONFIG_ARM_32
-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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