xen/arm: earlyprintk: move early_flush in early_puts
authorJulien Grall <julien.grall@linaro.org>
Thu, 13 Mar 2014 15:09:14 +0000 (15:09 +0000)
committerIan Campbell <ian.campbell@citrix.com>
Tue, 1 Apr 2014 10:27:21 +0000 (11:27 +0100)
early_puts function will be exported to be used in the console code. To
avoid loosing characters (see why in commit cafdceb "xen/arm: avoid lost
characters with early_printk), early_flush needs to be called in this
function.

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/arm/early_printk.c

index 2870a30c41a3a3532f4d3105c1f391a76ab9d92f..b59ea2ebc1aa0c22d020d8959516747d3eed7f47 100644 (file)
@@ -29,12 +29,6 @@ static void __init early_puts(const char *s)
         early_putch(*s);
         s++;
     }
-}
-
-static void __init early_vprintk(const char *fmt, va_list args)
-{
-    vsnprintf(buf, sizeof(buf), fmt, args);
-    early_puts(buf);
 
     /*
      * Wait the UART has finished to transfer all characters before
@@ -43,6 +37,12 @@ static void __init early_vprintk(const char *fmt, va_list args)
     early_flush();
 }
 
+static void __init early_vprintk(const char *fmt, va_list args)
+{
+    vsnprintf(buf, sizeof(buf), fmt, args);
+    early_puts(buf);
+}
+
 void __init early_printk(const char *fmt, ...)
 {
     va_list args;