From patchwork Wed Jul 11 18:32:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Belloni X-Patchwork-Id: 10520273 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 197F46032A for ; Wed, 11 Jul 2018 18:33:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 05B2E2937B for ; Wed, 11 Jul 2018 18:33:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ECF54293EC; Wed, 11 Jul 2018 18:33:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9932A2937B for ; Wed, 11 Jul 2018 18:33:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=1GYpj+9zacOqLy/eNudTmMaAmcfymYL4EdHfjJysJUg=; b=Dt/ w8/OE9Wg/ESlKWFSAbhAye1PuyLJbccRI00s+2siG1gTCHb2vnI8lLNeobooKp95rB6Edx14VtWJb KXVp31W9dNLZUnEG5gRvOPnmE74Lo896sUr5g3gWhoWhglYtlM9R7sRBviYMmFA650h27A0mdeJBZ qJKOLV9JryNE3aNc9Ez1n/fg+8sIgC93TW0Dtf1Q5vepdzEgQp9AFrZLMs9BZTgciG5y2c1IpaU4+ bCwy+b4TmJTlvDM+lMaiVTvQQqT9cqisRYC5v1Y97gBZe7xEA/+way7zA9xPHw1Z3xRwY7K6CBvAO BhXzmeFUm6klf8S4C47XzvCXeIviVYA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdJvm-0001E9-Vg; Wed, 11 Jul 2018 18:33:38 +0000 Received: from mail.bootlin.com ([62.4.15.54]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fdJvD-00019M-Co for linux-arm-kernel@lists.infradead.org; Wed, 11 Jul 2018 18:33:04 +0000 Received: by mail.bootlin.com (Postfix, from userid 110) id 57CD920741; Wed, 11 Jul 2018 20:32:51 +0200 (CEST) Received: from localhost (unknown [88.191.26.124]) by mail.bootlin.com (Postfix) with ESMTPSA id 2D4B2203D9; Wed, 11 Jul 2018 20:32:41 +0200 (CEST) From: Alexandre Belloni To: Russell King Subject: [PATCH] ARM: early_printk: respect keep parameter Date: Wed, 11 Jul 2018 20:32:39 +0200 Message-Id: <20180711183239.21023-1-alexandre.belloni@bootlin.com> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180711_113303_573236_FEE0845E X-CRM114-Status: GOOD ( 10.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Nicolas Pitre , Alexandre Belloni , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Parse and use the keep parameter of earlyprintk to avoid having the kernel output stop with: Console: colour dummy device 80x30 console [tty0] enabled bootconsole [earlycon0] disabled This happens because once tty0, the virtual terminal console is registered, it is selected as the default console, disregarding an existing stdout-path DT property and the early console is shutdown before the console driver is probed. Signed-off-by: Alexandre Belloni --- arch/arm/kernel/early_printk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm/kernel/early_printk.c b/arch/arm/kernel/early_printk.c index 9257736ec9fa..bbb10150b11a 100644 --- a/arch/arm/kernel/early_printk.c +++ b/arch/arm/kernel/early_printk.c @@ -42,6 +42,9 @@ static struct console early_console_dev = { static int __init setup_early_printk(char *buf) { + if (buf && strstr(buf, "keep")) + early_console_dev.flags &= ~CON_BOOT; + early_console = &early_console_dev; register_console(&early_console_dev); return 0;