From patchwork Mon Feb 24 14:52:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 25198 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f72.google.com (mail-pb0-f72.google.com [209.85.160.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9F9242066C for ; Mon, 24 Feb 2014 14:53:50 +0000 (UTC) Received: by mail-pb0-f72.google.com with SMTP id jt11sf3438965pbb.7 for ; Mon, 24 Feb 2014 06:53:49 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=J5tP4CCJPbN8yvbEGAg3GbWf+jIdqaFHvIyoYtF1ma8=; b=S1GWAZTiQZv5+M/QUXRRe1YEC/iBgRgJZhW0vzv0pmGPxAg/j0FALrxIQzsRWDHTM9 6fxxSOuzY0FwogGoVdOvCZhWhxiaozbQJlVyRXGnWiOvb1YmMNt90LnGpEWcqQcw/ghV eXr2aEEApB95+1dBRRVzZ6PBadEk0uyZzHQrtgs2C2cbHTHpwArFELJjVMFXf66nv50r AL+Cd+x0rHwMAkS7FA67nU4atRkxgU7JyOYPNkOHfrAAdJg639d4OQJ5z1opsdAksLfV mAF58c57sB99ph5rfIT+JzyD2EKp+PjmUhzOuQbwdgxMDI+71kpbhFS7divbNuQ/1YxW vp7w== X-Gm-Message-State: ALoCoQmMo0a+zk1G2Fnz43NZ33V+5T1AH2Ml5nmJXT0pEgKHW81Pr0vRRkpbE3KQ0iTuUMVvV0pt X-Received: by 10.66.52.80 with SMTP id r16mr847254pao.15.1393253629876; Mon, 24 Feb 2014 06:53:49 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.92.240 with SMTP id b103ls2070463qge.57.gmail; Mon, 24 Feb 2014 06:53:49 -0800 (PST) X-Received: by 10.220.188.10 with SMTP id cy10mr12831522vcb.36.1393253629676; Mon, 24 Feb 2014 06:53:49 -0800 (PST) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id or7si5879883vcb.136.2014.02.24.06.53.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 24 Feb 2014 06:53:49 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if11so5757600vcb.8 for ; Mon, 24 Feb 2014 06:53:49 -0800 (PST) X-Received: by 10.220.103.141 with SMTP id k13mr12870622vco.25.1393253629589; Mon, 24 Feb 2014 06:53:49 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.174.196 with SMTP id u4csp66740vcz; Mon, 24 Feb 2014 06:53:49 -0800 (PST) X-Received: by 10.52.84.102 with SMTP id x6mr10716237vdy.49.1393253628984; Mon, 24 Feb 2014 06:53:48 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id sq4si5873109vdc.80.2014.02.24.06.53.48 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Feb 2014 06:53:48 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WHwu6-00067v-8Y; Mon, 24 Feb 2014 14:53:10 +0000 Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WHwu4-00067P-Jf for xen-devel@lists.xenproject.org; Mon, 24 Feb 2014 14:53:08 +0000 Received: from [85.158.143.35:63030] by server-3.bemta-4.messagelabs.com id 72/2E-11539-4DC5B035; Mon, 24 Feb 2014 14:53:08 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-12.tower-21.messagelabs.com!1393253587!7899016!1 X-Originating-IP: [74.125.83.51] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 17791 invoked from network); 24 Feb 2014 14:53:07 -0000 Received: from mail-ee0-f51.google.com (HELO mail-ee0-f51.google.com) (74.125.83.51) by server-12.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 24 Feb 2014 14:53:07 -0000 Received: by mail-ee0-f51.google.com with SMTP id b57so3211808eek.24 for ; Mon, 24 Feb 2014 06:53:07 -0800 (PST) X-Received: by 10.14.98.66 with SMTP id u42mr25304313eef.18.1393253586990; Mon, 24 Feb 2014 06:53:06 -0800 (PST) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id x6sm64689130eew.20.2014.02.24.06.53.03 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Feb 2014 06:53:06 -0800 (PST) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Mon, 24 Feb 2014 14:52:47 +0000 Message-Id: <1393253572-7157-2-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1393253572-7157-1-git-send-email-julien.grall@linaro.org> References: <1393253572-7157-1-git-send-email-julien.grall@linaro.org> Cc: stefano.stabellini@citrix.com, Julien Grall , tim@xen.org, ian.campbell@citrix.com Subject: [Xen-devel] [PATCH v2 1/6] xen/arm: earlyprintk: move early_flush in early_puts X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: 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;