From: Ian Campbell Subject: Re: [RFC 1/6] xen/arm: earlyprintk: move early_flush in early_puts Date: Wed, 19 Feb 2014 11:13:15 +0000 Message-ID: <1392808395.23084.133.camel@kazak.uk.xensource.com> References: <1388957191-10337-1-git-send-email-julien.grall@linaro.org> <1388957191-10337-2-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WG55c-0003Nl-Vs for xen-devel@lists.xenproject.org; Wed, 19 Feb 2014 11:13:21 +0000 In-Reply-To: <1388957191-10337-2-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, stefano.stabellini@eu.citrix.com, tim@xen.org, patches@linaro.org List-Id: xen-devel@lists.xenproject.org On Sun, 2014-01-05 at 21:26 +0000, Julien Grall wrote: > 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 Acked-by: Ian Campbell > --- > xen/arch/arm/early_printk.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/xen/arch/arm/early_printk.c b/xen/arch/arm/early_printk.c > index 41938bb..7143f9e 100644 > --- a/xen/arch/arm/early_printk.c > +++ b/xen/arch/arm/early_printk.c > @@ -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;