From patchwork Sat May 24 21:21:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 352172 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 13D47140086 for ; Sun, 25 May 2014 07:24:57 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8DB634B663; Sat, 24 May 2014 23:24:36 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id coLJnch8qagH; Sat, 24 May 2014 23:24:36 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 84AFB4B698; Sat, 24 May 2014 23:22:57 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 625CE4B659 for ; Sat, 24 May 2014 23:22:47 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CsulhmIve74o for ; Sat, 24 May 2014 23:22:46 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-qc0-f202.google.com (mail-qc0-f202.google.com [209.85.216.202]) by theia.denx.de (Postfix) with ESMTPS id 262974B66E for ; Sat, 24 May 2014 23:22:03 +0200 (CEST) Received: by mail-qc0-f202.google.com with SMTP id r5so243329qcx.3 for ; Sat, 24 May 2014 14:22:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AfIkhwqM4O2P2YHLctOC703tGLC6zGanKeMeUgjkinQ=; b=NXolLaFUyN1cYsSfJKWuIdi73y5TtSwp1/tmfr5WTzMyYuCZk+jqua6KiGhvws5a5f U3uFZ4Us0HnjerLnw16mM2G69FfZy+GWPAP7ZX7ZsEFJKl2FDgGAjWKSa9WRg5Ek3+cB /kHFWe5uRHun7Do7iA3e4rH5F0VtBP3aiD9atZvC3q79xke74nD1tYzEdPUlnH6RT8DC uhGV5+ebko+fDEu8zLoFKDvOFIWvIr8HJ0vOlDJpsk686l8ooZEOm8xahIkV31g0rR5u WF3REQ2GS6VLxT+o66TCbRN+NERwQey3On4uFBOnuYnWja3juEoymijiKFdAJUGqsfUy sZqg== X-Gm-Message-State: ALoCoQksG+OaO4mAwT2PbsIa8bYNktwrmPxeVEZKVmBvkvZvfY3wHf2FX24zRUHhmbzJ8UVLc4Lh X-Received: by 10.236.83.161 with SMTP id q21mr5266065yhe.41.1400966522139; Sat, 24 May 2014 14:22:02 -0700 (PDT) Received: from corp2gmr1-1.hot.corp.google.com (corp2gmr1-1.hot.corp.google.com [172.24.189.92]) by gmr-mx.google.com with ESMTPS id y50si508458yhk.4.2014.05.24.14.22.02 for (version=TLSv1.1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 24 May 2014 14:22:02 -0700 (PDT) Received: from kaki.bld.corp.google.com (kaki.bld.corp.google.com [172.29.216.32]) by corp2gmr1-1.hot.corp.google.com (Postfix) with ESMTP id 096F831D3EF; Sat, 24 May 2014 14:22:02 -0700 (PDT) Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id CCE98221025; Sat, 24 May 2014 15:22:01 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 24 May 2014 15:21:13 -0600 Message-Id: <1400966481-14131-15-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.9.1.423.g4596e3a In-Reply-To: <1400966481-14131-1-git-send-email-sjg@chromium.org> References: <1400966481-14131-1-git-send-email-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [RFC PATCH 14/22] console: Remove vprintf() optimisation for sandbox X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de If the console is not present, we try to reduce overhead by stopping any output in vprintf(), before it gets to putc(). This is dubious merit in general, but in the case of sandbox it is incorrect, since we have a fallback console which reports errors very early in U-Boot. If this is defeated U-Boot can hang or exit with no indication of what is wrong. Remove the optimisation for sandbox. Signed-off-by: Simon Glass --- common/console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/console.c b/common/console.c index 11c102a..5576dfd 100644 --- a/common/console.c +++ b/common/console.c @@ -504,7 +504,7 @@ int vprintf(const char *fmt, va_list args) uint i; char printbuffer[CONFIG_SYS_PBSIZE]; -#ifndef CONFIG_PRE_CONSOLE_BUFFER +#if defined(CONFIG_PRE_CONSOLE_BUFFER) && !defined(CONFIG_SANDBOX) if (!gd->have_console) return 0; #endif