From: Sudeep Holla <sudeep.holla@arm.com>
To: Aleksey Makarov <aleksey.makarov@linaro.org>,
linux-serial@vger.kernel.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
linux-kernel@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peter Hurley <peter@hurleysoftware.com>,
Jiri Slaby <jslaby@suse.com>, Robin Murphy <robin.murphy@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
"Nair, Jayachandran" <Jayachandran.Nair@cavium.com>
Subject: Re: [PATCH v2 0/3] printk: fix double printing with earlycon
Date: Tue, 14 Mar 2017 16:17:59 +0000 [thread overview]
Message-ID: <f6d929e6-0acc-3654-7d61-e0f1c67642f5@arm.com> (raw)
In-Reply-To: <20170302131153.22733-1-aleksey.makarov@linaro.org>
Hi Aleksey,
(Sorry for the delayed response, was on vacation)
On 02/03/17 13:11, Aleksey Makarov wrote:
> If a console was specified by ACPI SPCR table _and_ command line parameters like
> "console=ttyAMA0" _and_ "earlycon" were specified, then log messages
> appear twice.
>
> This issue was addressed in the patch [1] but the approach was wrong and
> a revert [2] was suggested.
>
> First two patches "printk: fix name/type/scope of preferred_console var" and
> "printk: rename selected_console -> preferred_console" were sent sent some
> time ago as one patch "printk: fix name and type of some variables" [3].
> They fix name/type/scope of some variables without changing the logic.
>
> The real fix is in the second patch. The root cause is that the code traverses
> the list of specified consoles (the `console_cmdline` array) and stops at the
> first match. But it may happen that the same console is referred by
> the elements of this array twice:
>
> pl011,mmio,0x87e024000000,115200 -- from SPCR
> ttyAMA0 -- from command line
>
> but in this case `preferred_console` points to the second entry and
> the flag CON_CONSDEV is not set, so bootconsole is not deregistered.
>
> To fix that, match the console against the `console_cmdline` entry
> pointed by `preferred_console` instead of the first match.
>
> v2:
> - split the patch that renames `selected_console` and `preferred_console`
> into two patches (Steven Rostedt)
> - add a comment explaining why we need a separate match to check for
> preferred_console (Steven Rostedt)
> - v1 of this patchset changed the logic of console initialization a bit.
> That could lead to bugs/incompatibilities. Use the exactly the same
> logic as in the original code.
>
Tested the series(v3 of patch 3) and works as expected. Thanks for the
proper fix.
Tested-by: Sudeep Holla <sudeep.holla@arm.com>
--
Regards,
Sudeep
prev parent reply other threads:[~2017-03-14 16:18 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 13:11 Aleksey Makarov
2017-03-02 13:11 ` [PATCH v2 1/3] printk: fix name/type/scope of preferred_console var Aleksey Makarov
2017-03-02 14:49 ` Steven Rostedt
2017-03-02 15:59 ` Sergey Senozhatsky
2017-03-14 16:52 ` Petr Mladek
2017-03-02 13:11 ` [PATCH v2 2/3] printk: rename selected_console -> preferred_console Aleksey Makarov
2017-03-02 15:01 ` Steven Rostedt
2017-03-02 16:09 ` Sergey Senozhatsky
2017-03-15 9:00 ` Petr Mladek
2017-03-02 13:11 ` [PATCH v2 3/3] printk: fix double printing with earlycon Aleksey Makarov
2017-03-02 13:58 ` Aleksey Makarov
2017-03-03 15:49 ` [PATCH v3 " Aleksey Makarov
2017-03-06 14:59 ` Sergey Senozhatsky
2017-03-07 14:54 ` Aleksey Makarov
2017-03-08 5:33 ` Sergey Senozhatsky
2017-03-08 12:59 ` Aleksey Makarov
2017-03-14 16:17 ` Sudeep Holla [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=f6d929e6-0acc-3654-7d61-e0f1c67642f5@arm.com \
--to=sudeep.holla@arm.com \
--cc=Jayachandran.Nair@cavium.com \
--cc=aleksey.makarov@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=jslaby@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter@hurleysoftware.com \
--cc=robin.murphy@arm.com \
--cc=rostedt@goodmis.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
all inboxes | Powered by JetHome®