[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAD=FV=Xut=5y-MyJSu+ERdMRkKbSf8SGMhUHg5OP=y8zA1N-xQ@mail.gmail.com>
Date: Thu, 21 May 2020 10:18:10 -0700
From: Doug Anderson <dianders@...omium.org>
To: Daniel Thompson <daniel.thompson@...aro.org>
Cc: Jason Wessel <jason.wessel@...driver.com>,
Sumit Garg <sumit.garg@...aro.org>,
kgdb-bugreport@...ts.sourceforge.net, linux-serial@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Patch Tracking <patches@...aro.org>
Subject: Re: [PATCH v2] serial: kgdboc: Allow earlycon initialization to be deferred
Hi,
On Thu, Apr 30, 2020 at 9:47 AM Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Thu, Apr 30, 2020 at 9:18 AM Daniel Thompson
> <daniel.thompson@...aro.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@...aro.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@...omium.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!
-Doug
Powered by blists - more mailing lists