diff mbox

[RFC,05/29] xen/arm: Fix early_panic when EARLY_PRINTK is disabled

Message ID a86f479240ec5bc6592fece5fe6c3a1de57e3487.1367188423.git.julien.grall@linaro.org
State Changes Requested, archived
Headers show

Commit Message

Julien Grall April 28, 2013, 11:01 p.m. UTC
Even if EARLY_PRINTK is not enabled, early_panic must never return.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
---
 xen/include/asm-arm/early_printk.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Ian Campbell April 29, 2013, 3:01 p.m. UTC | #1
On Mon, 2013-04-29 at 00:01 +0100, Julien Grall wrote:
> Even if EARLY_PRINTK is not enabled, early_panic must never return.
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

> ---
>  xen/include/asm-arm/early_printk.h |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
> index a770d4a..a0297a7 100644
> --- a/xen/include/asm-arm/early_printk.h
> +++ b/xen/include/asm-arm/early_printk.h
> @@ -20,7 +20,7 @@ void early_panic(const char *fmt, ...) __attribute__((noreturn));
>  #else
>  
>  static inline void early_printk(const char *fmt, ...) {}
> -static inline void early_panic(const char *fmt, ...) {}
> +static inline void  __attribute__((noreturn)) early_panic(const char *fmt, ...) {while(1);}
>  
>  #endif
>
diff mbox

Patch

diff --git a/xen/include/asm-arm/early_printk.h b/xen/include/asm-arm/early_printk.h
index a770d4a..a0297a7 100644
--- a/xen/include/asm-arm/early_printk.h
+++ b/xen/include/asm-arm/early_printk.h
@@ -20,7 +20,7 @@  void early_panic(const char *fmt, ...) __attribute__((noreturn));
 #else
 
 static inline void early_printk(const char *fmt, ...) {}
-static inline void early_panic(const char *fmt, ...) {}
+static inline void  __attribute__((noreturn)) early_panic(const char *fmt, ...) {while(1);}
 
 #endif