linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jslaby@suse.com>, Sumit Garg <sumit.garg@linaro.org>,
	linux-serial@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH] serial: earlycon: Allow earlier DT scan is acpi=off
Date: Thu, 30 Apr 2020 13:09:33 +0100	[thread overview]
Message-ID: <20200430120933.r33oraqvt7p4lu2v@holly.lan> (raw)
In-Reply-To: <CAD=FV=VTkO5AULJe1ksyhKLLxpywqX-RLC_T4ENyDf3ONJNMKg@mail.gmail.com>

On Wed, Apr 29, 2020 at 05:40:10PM -0700, Doug Anderson wrote:
> Hi,
> 
> On Tue, Apr 28, 2020 at 9:22 AM Daniel Thompson
> <daniel.thompson@linaro.org> wrote:
> >
> > Currently if the kernel has support for ACPI SPCR parsing then earlycon
> > without arguments is processed later than the full earlycon=...
> > alternative.
> >
> > If ACPI has been explicitly disabled on the kernel command line then
> > there is not need to defer since the ACPI code (both x86 and arm64)
> > will never actually run.
> >
> > Or, put another way it allows lazy people to throw "acpi=off earlycon"
> > onto the command line of a DT systems and be confident the console will
> > start as early as possible without them having to lookup the driver
> > and address needed for a specific platform.
> >
> > Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
> > ---
> >  drivers/tty/serial/earlycon.c | 28 +++++++++++++++++++++++++++-
> >  1 file changed, 27 insertions(+), 1 deletion(-)
> 
> I wonder if a cleaner option is to just add a special "earlycon" value
> like "earlycon=not_acpi".  This wouldn't require any special peeking
> and would just be a sentinel that just says "you should autodetect the
> earlycon, but don't worry about waiting for ACPI".  ...that in itself
> is a bit of a hack, but at least it's more self contained in the
> earlycon driver and maybe more discoverable when someone is figuring
> out how to setup earlycon?

Taking this idea further I wonder if we could even make this earlycon=acpi.
In other words if the loader provided a DT and earlycon has no arguments
when we use the DT to setup the earlycon regardless of any later
decision to adopt ACPI.

I think the only time this would do the wrong thing is if the DT and
ACPI tables are both passed to the kernel and have different early
consoles. This would be a very weird thing for the firmware to do
by, just in case, we could offer earlycon=acpi to accommodate it.

Naturally I do have to code and test it ;-).


Daniel.

      reply	other threads:[~2020-04-30 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-28 16:22 [PATCH] serial: earlycon: Allow earlier DT scan is acpi=off Daniel Thompson
2020-04-30  0:40 ` Doug Anderson
2020-04-30 12:09   ` Daniel Thompson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200430120933.r33oraqvt7p4lu2v@holly.lan \
    --to=daniel.thompson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=patches@linaro.org \
    --cc=sumit.garg@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).