Linux-Serial Archive on lore.kernel.org
 help / color / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Doug Anderson <dianders@chromium.org>
Cc: Jason Wessel <jason.wessel@windriver.com>,
	Sumit Garg <sumit.garg@linaro.org>,
	kgdb-bugreport@lists.sourceforge.net,
	linux-serial@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH v2] serial: kgdboc: Allow earlycon initialization to be deferred
Date: Fri, 22 May 2020 16:30:31 +0100
Message-ID: <20200522153031.2ydgx4k6jl7dsiqn@holly.lan> (raw)
In-Reply-To: <CAD=FV=Xut=5y-MyJSu+ERdMRkKbSf8SGMhUHg5OP=y8zA1N-xQ@mail.gmail.com>

On Thu, May 21, 2020 at 10:18:10AM -0700, Doug Anderson wrote:
> Hi,
> 
> On Thu, Apr 30, 2020 at 9:47 AM Doug Anderson <dianders@chromium.org> wrote:
> >
> > Hi,
> >
> > On Thu, Apr 30, 2020 at 9:18 AM Daniel Thompson
> > <daniel.thompson@linaro.org> wrote:
> > >
> > > Currently there is no guarantee that an earlycon will be initialized
> > > before kgdboc tries to adopt it. Almost the opposite: on systems
> > > with ACPI then if earlycon has no arguments then it is guaranteed that
> > > earlycon will not be initialized.
> > >
> > > This patch mitigates the problem by giving kgdboc_earlycon a second
> > > chance during console_init(). This isn't quite as good as stopping during
> > > early parameter parsing but it is still early in the kernel boot.
> > >
> > > Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
> > > ---
> > >
> > > Notes:
> > >     v2: Simplified, more robust, runs earlier, still has Doug's
> > >         recent patchset as a prerequisite. What's not to like?
> > >
> > >     More specifically, based on feedback from Doug Anderson, I
> > >     have replaced the initial hacky implementation with a console
> > >     initcall.
> > >
> > >     I also made it defer more aggressively after realizing that both
> > >     earlycon and kgdboc_earlycon are handled as early parameters
> > >     (meaning I think the current approach relies on the ordering
> > >     of drivers/tty/serial/Makefile to ensure the earlycon is enabled
> > >     before kgdboc tries to adopt it).
> > >
> > >     Finally, my apologies to Jason and kgdb ML folks, who are seeing
> > >     this patch for the first time. I copied the original circulation
> > >     list from a patch that wasn't kgdb related and forgot to update.
> > >
> > >  drivers/tty/serial/kgdboc.c | 41 +++++++++++++++++++++++++++++++++++--
> > >  1 file changed, 39 insertions(+), 2 deletions(-)
> >
> > Thanks, this looks great!
> >
> > Reviewed-by: Douglas Anderson <dianders@chromium.org>
> 
> Are you planning to rebase this patch atop what landed?  It seems like
> a useful feature.  If you want me to give a shot a rebasing, let me
> know!

I've got it on it's way...


Daniel.

      reply index

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 17:08 [PATCH] " Daniel Thompson
2020-04-30  0:32 ` Doug Anderson
2020-04-30 10:23   ` Daniel Thompson
2020-04-30 16:17 ` [PATCH v2] " Daniel Thompson
2020-04-30 16:47   ` Doug Anderson
2020-05-21 17:18     ` Doug Anderson
2020-05-22 15:30       ` 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=20200522153031.2ydgx4k6jl7dsiqn@holly.lan \
    --to=daniel.thompson@linaro.org \
    --cc=dianders@chromium.org \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --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

Linux-Serial Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-serial/0 linux-serial/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-serial linux-serial/ https://lore.kernel.org/linux-serial \
		linux-serial@vger.kernel.org
	public-inbox-index linux-serial

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-serial


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git