Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp41465imm; Tue, 17 Jul 2018 13:33:54 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcuqcTgCUTFKWc+ozL7uP+CnafSnlp5guSO8zD8wx88D9Gz91PFoE/JrylQFlajbKCXOX+V X-Received: by 2002:a62:6941:: with SMTP id e62-v6mr1769134pfc.217.1531859634312; Tue, 17 Jul 2018 13:33:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531859634; cv=none; d=google.com; s=arc-20160816; b=i1kQA02b+GSpG1KKLPvFiVk8jtkJfo/mXmDO0f5jjLaGrjKDrv9rBQUUM5gfvIo2Wx PAf6Oh76VSRZDF3nghfmZSAONtm7cgHm39XgrOhRjLuVZMz11TIjgt5cR4jesJnnU04i MQH8o0rQ80Gr5l7MdcFp0D/KOjCAUHYnl1cpoLGpf3rqG7e7D2U/4g/wFHu98wXTwIDM Hp7hPr26I+Y0GEO/xME+T9wmdDOSdGYwibBk+6KmAatR1qk7En2eVaQF+7cS/VuvfTCO 0AWPDzr5Y6RdpU6BO5Q7H9juJ65koRbVt6cVQuWR64RnKUAhb/J6Obr4i1DgE0oB2Wzi rGVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=h1W+DceBULdcJV9BnrSnFp+YOL1kQics7tnQy2GhQRQ=; b=A+Z6nmePLxnZAZe6Obeuh5j6wLQO8xY6i6HNPtRgheH+Svax0Hft8M8apycAYdcy+a ZrJzxCcry0Ah4+UeN6VDiEmUlfL9mCUXRj+tBOSezjJ2tXcMj7vqvULrDThddJZwBqD3 YomPTRqN0nUdMgJq3dM/u25npDpZ01oX13D6dDfonRYAsp2xWKivzqm1qCr7NeCURYKD e4T/98MLYTmm5Kqlm9b+K6w8mBtBPHB9vE5vLubSc+p6aEJGauTj4nt12VUUNlgRnRO6 XleqQVl5PyU0Y1cBjro1voQh08drIR6Tr3+/aXruCDHTQFovh8IiyWBMFvXsPupE9Mwh ehew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m18-v6si1608834pgi.688.2018.07.17.13.33.38; Tue, 17 Jul 2018 13:33:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730214AbeGQVGP (ORCPT + 99 others); Tue, 17 Jul 2018 17:06:15 -0400 Received: from mail.bootlin.com ([62.4.15.54]:55812 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729657AbeGQVGO (ORCPT ); Tue, 17 Jul 2018 17:06:14 -0400 Received: by mail.bootlin.com (Postfix, from userid 110) id 60920207AB; Tue, 17 Jul 2018 22:31:53 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.bootlin.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT, URIBL_BLOCKED shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (unknown [88.191.26.124]) by mail.bootlin.com (Postfix) with ESMTPSA id 30702206FF; Tue, 17 Jul 2018 22:31:53 +0200 (CEST) Date: Tue, 17 Jul 2018 22:31:53 +0200 From: Alexandre Belloni To: Nicolas Pitre Cc: Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: early_printk: respect keep parameter Message-ID: <20180717203153.GC3211@piout.net> References: <20180711183239.21023-1-alexandre.belloni@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 17/07/2018 16:16:44-0400, Nicolas Pitre wrote: > On Wed, 11 Jul 2018, Alexandre Belloni wrote: > > > 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 > > Why can't you have a real console driver that takes over at that point > which respects whatever DT property you give it? > See Russell's analysis here: https://www.spinics.net/lists/linux-serial/msg25363.html > The early_printk code is very raw and inefficient, and it shouldn't be > used for anything but the debugging of early boot hangs. > The issue I had is that he pinctrl driver wasn't probing so the real console driver could never probe. I think this fits the use case. Also, atmel_serial doesn't yet have earlycon support. > > --- > > 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; > > -- > > 2.18.0 > > > > > -- Alexandre Belloni, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com