xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@linaro.org>
To: xen-devel@lists.xenproject.org
Cc: stefano.stabellini@eu.citrix.com, tim@xen.org,
	ian.campbell@citrix.com, Julien Grall <julien.grall@linaro.org>,
	patches@linaro.org
Subject: [PATCH] xen/arm: Panic if platform initialization failed
Date: Fri, 15 Nov 2013 15:27:36 +0000	[thread overview]
Message-ID: <1384529257-7590-2-git-send-email-julien.grall@linaro.org> (raw)
In-Reply-To: <1384529257-7590-1-git-send-email-julien.grall@linaro.org>

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@linaro.org>
---
 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

  reply	other threads:[~2013-11-15 15:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15 15:27 [PATCH] xen/arm: ioremap_attr: return NULL is __vmap failed Julien Grall
2013-11-15 15:27 ` Julien Grall [this message]
2013-11-15 15:59   ` [PATCH] xen/arm: Panic if platform initialization failed Stefano Stabellini
2013-11-19 14:50     ` Ian Campbell
2013-11-15 15:27 ` [PATCH] xen/arm: Panic if we are unable to initialize platform timer Julien Grall
2013-11-15 15:58   ` Stefano Stabellini
2013-11-19 14:47     ` Ian Campbell
2013-11-19 16:39       ` Julien Grall
2013-11-15 15:45 ` [PATCH] xen/arm: ioremap_attr: return NULL is __vmap failed Andrew Cooper
2013-11-15 16:04 ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1384529257-7590-2-git-send-email-julien.grall@linaro.org \
    --to=julien.grall@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=patches@linaro.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).