Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp29453imm; Tue, 17 Jul 2018 13:18:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdg75L5I3LqKr8+JTylsmofi/GNSSpR04mBgppcSMpOHCBoj6CEiIKI9RoaKt4j9Ck5zJS5 X-Received: by 2002:a17:902:7898:: with SMTP id q24-v6mr2975100pll.254.1531858710540; Tue, 17 Jul 2018 13:18:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531858710; cv=none; d=google.com; s=arc-20160816; b=vvNSiyCkGKRXBtkgN/AgYmHtKh/T3B7+UnhgslwjSY3zktenwmxpNSzgQED2/jziou J0EIo6+4iTa1+HUND/jLbLmpwUSBmv1QRr+AvUiDUIB27te0Ny/uGyIVQ0044JVtaZOe IXz69TOuyn1ALjP6c05Xqqm2+o0XgtnUF0V4ULX0Qe9yHfj2oxtCAMo7TEYBe09ZuD/B /YrE0/Yf+7CWoOVaujlKm3DBRjiXtS5hRkDATwIJ3HRvNKHJbnP6ZuuRbIpYEg2xajX+ 5bJrQUx32m2XDf1iaKFbsV2Wag5Lmud70Crh96p6H2a8/pecN7N0iO43tqMZWpORMG+Q vjGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=H9VwNQ7XZIfP82BCmlFPU2TtUCFDNitoXqnUYg53efs=; b=DSYKde8tUm99Sj+qywrzXDbTl6o4dEVHl/1rx1YY17DhRFSVo6JrQ3Lh4CpCO89thp 4NoI50KrZha3POc7EpW7g4D6kSdvU8KHhS6hNi2qABIhRSgm4NMJ+sPca/RdbvDZAu0C KwhP4RdpjoDL/36wBxH/zYHC9UrwdOFU9BF1SczN0sVjaQdAdWFxCPOwcIkTMoWM5Uy7 N+8AHSs6+SlQJ78n/NNWYpQN9YPddBZYb2OrQGd39BH76N06Pk9q8KMpiZTRGlPdJlJe 6NMHZUcRz4xo+sWbGk7ap/YHOQ38qIGhBCyUXjbEWfJYGDMwxlBE3OU/bs9bWKqUz4Ye Qepg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Gvi6J8Dn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v11-v6si1614771pgo.278.2018.07.17.13.18.15; Tue, 17 Jul 2018 13:18:30 -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; dkim=pass header.i=@linaro.org header.s=google header.b=Gvi6J8Dn; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730429AbeGQUvE (ORCPT + 99 others); Tue, 17 Jul 2018 16:51:04 -0400 Received: from mail-qk0-f193.google.com ([209.85.220.193]:43288 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730003AbeGQUvE (ORCPT ); Tue, 17 Jul 2018 16:51:04 -0400 Received: by mail-qk0-f193.google.com with SMTP id z74-v6so1224304qkb.10 for ; Tue, 17 Jul 2018 13:16:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=H9VwNQ7XZIfP82BCmlFPU2TtUCFDNitoXqnUYg53efs=; b=Gvi6J8Dn45vZAI+mC4nQycb/lcDzZYHQYYJttckyeRIjyvbn/zKSxRr6Hu7RrK3NYM cdq03XW37pjhDrkmMSYa5M73Coc5OOLc+F/euUkH+ly74cmSBMpZF77QC2dx5u6nv+6l 0T0rQUC+ble3tW/+c04bLDOOM9Mu0UWNAGUcM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=H9VwNQ7XZIfP82BCmlFPU2TtUCFDNitoXqnUYg53efs=; b=D8KENCwd8NV8wkNEpbXtYsBgFSH5p4Ss8AqCbsyQQvTPQs8ZhuJkXUr2bJtu+BxxLZ H0OW+XeZfGdZUS2/GxRGH3Jyc+lSNQO9sRbyLUoZD3X+gLQTVL/uY+UJDyifIiO4wqOG N/DCxlu+yG0OF7ayCwBGYor6UyS+6IIRrF9gfvumMnRdArGori5LT9Ohn5T3hdmY3fbv PWa7MIku6V66DCqubrgFjyptgEuyO2MYYjxyoW0nT0KLymPMBALcmqF7FEakCUTTYldk ukPL8M4YurYxVzcN63DtkqDtTvnaO6UT9jdSK6ixcKvvAlwOOAieEgGoema1BOWTggBP B2UQ== X-Gm-Message-State: AOUpUlHvZ1ZE9RMgpUxuXPTjUdupphT5TUZ10Z4DRImGhlKfvekDGgUG RgRep2Pn8RmsAPxkffrFikb5bZvhfKk= X-Received: by 2002:a37:7d87:: with SMTP id y129-v6mr2824427qkc.232.1531858606988; Tue, 17 Jul 2018 13:16:46 -0700 (PDT) Received: from xanadu.home (modemcable228.104-82-70.mc.videotron.ca. [70.82.104.228]) by smtp.gmail.com with ESMTPSA id l36-v6sm1827842qtk.12.2018.07.17.13.16.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 13:16:45 -0700 (PDT) Date: Tue, 17 Jul 2018 16:16:44 -0400 (EDT) From: Nicolas Pitre To: Alexandre Belloni cc: Russell King , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ARM: early_printk: respect keep parameter In-Reply-To: <20180711183239.21023-1-alexandre.belloni@bootlin.com> Message-ID: References: <20180711183239.21023-1-alexandre.belloni@bootlin.com> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? The early_printk code is very raw and inefficient, and it shouldn't be used for anything but the debugging of early boot hangs. > --- > 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 > >