linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: linux-kernel@vger.kernel.org, Mark Salter <msalter@redhat.com>,
	Al Stone <ahs3@redhat.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	x86@kernel.org, Petr Mladek <pmladek@suse.com>,
	Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
	Steven Rostedt <rostedt@goodmis.org>,
	Kees Cook <keescook@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH v2] console: Add console=auto option
Date: Fri, 17 Aug 2018 06:36:10 -0400	[thread overview]
Message-ID: <a530a430-70ce-c1e1-ccba-bf5df107c5ad@redhat.com> (raw)
In-Reply-To: <20180817093828.GA10337@jagdpanzerIV>



On 08/17/2018 05:38 AM, Sergey Senozhatsky wrote:
> On (08/16/18 13:39), Prarit Bhargava wrote:
>>
>> +		auto	[X86] Enable ACPI SPCR console
> 			^^^^
> 			And arm64?

Hi Sergey, on arm64 if an SPCR is present the early console and console are
initialized by default.  IOW no kernel parameter is necessary to initialize the
console in that case.

> 
> 
> Any chance we can rename param to "spcr" or something more clear?
> To explicitly state what exactly it's going to do. `auto' sounds
> too general and doesn't tell me that much. I'm probably the only
> here who can't see a connection between "auto" and "SPCR", but
> still.

I came up with "auto" because I think it is generic.  I also thought about
"console=fw", or just "console".  If in the future another arch wants to
optionally bring up a firmware or hardware defined console then they could use
auto too.

> 
> One more thing, as far as I can tell, acpi_parse_spcr() can fail
> and return an error. arch_console_setup() hides all errors and
> returns void. Should it return error code?
> 
> 	int arch_console_setup(void)
> 	{
> 		return acpi_parse_spcr(false, true);
> 	}
> 
> Or maybe
> 
> 	void arch_console_setup(void)
> 	{
> 		if (acpi_parse_spcr(false, true))
> 			pr_err(.........);
> 	}
> 
> There can be other consoles in the system, logging an error is not
> such a useless thing.

I can make the second change.  The problem (IIRC) with returning an error in an
setup fn is that the rest of the setup functions will not execute.  I don't want
to fail the setup callbacks because of an incorrect SPCR table.

Like I mentioned to Petr, I'd like to know if you (or anyone else) has strong
feelings about changing the behaviour of earlycon on x86?  I could make it so
that specifying just earlycon would also initialize the console.

P.

> 
> 	-ss
> 

  reply	other threads:[~2018-08-17 10:36 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-16 14:10 [PATCH] console: Add console=auto option Prarit Bhargava
2018-08-16 15:09 ` Greg Kroah-Hartman
2018-08-16 15:28   ` Prarit Bhargava
2018-08-16 15:33     ` Steven Rostedt
2018-08-16 17:23       ` Prarit Bhargava
2018-08-16 17:39         ` [PATCH v2] " Prarit Bhargava
2018-08-17  8:19           ` Petr Mladek
2018-08-17 10:26             ` Prarit Bhargava
2018-08-17  9:38           ` Sergey Senozhatsky
2018-08-17 10:36             ` Prarit Bhargava [this message]
2018-08-17 10:50               ` Sergey Senozhatsky
2018-08-17 11:06                 ` Prarit Bhargava
2018-08-17 12:57                   ` Petr Mladek
2018-08-29 12:54                     ` Prarit Bhargava

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=a530a430-70ce-c1e1-ccba-bf5df107c5ad@redhat.com \
    --to=prarit@redhat.com \
    --cc=ahs3@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=keescook@chromium.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=msalter@redhat.com \
    --cc=pavel@ucw.cz \
    --cc=pmladek@suse.com \
    --cc=rjw@rjwysocki.net \
    --cc=rostedt@goodmis.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sergey.senozhatsky@gmail.com \
    --cc=x86@kernel.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).