linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Prarit Bhargava <prarit@redhat.com>
To: Timur Tabi <timur@codeaurora.org>
Cc: ACPI Devel Maling List <linux-acpi@vger.kernel.org>,
	Jonathan Corbet <corbet@lwn.net>,
	the arch/x86 maintainers <x86@kernel.org>,
	linux-pm@vger.kernel.org,
	Catalin Marinas <catalin.marinas@arm.com>,
	Bhupesh Sharma <bhsharma@redhat.com>,
	linux-doc@vger.kernel.org, Will Deacon <will.deacon@arm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@redhat.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Lv Zheng <lv.zheng@intel.com>,
	linux-serial@vger.kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	Jeffrey Hugo <jhugo@codeaurora.org>
Subject: Re: [PATCH 2/2] acpi, x86: Use SPCR table for earlycon on x86
Date: Thu, 7 Dec 2017 14:03:20 -0500	[thread overview]
Message-ID: <c6ff196d-98e4-ab31-5d51-c342539afe96@redhat.com> (raw)
In-Reply-To: <CAOZdJXXdeY0+SRfSQC_X-L1UNemigO7DDgRk7jRdMKVe34NWvQ@mail.gmail.com>



On 12/07/2017 01:46 PM, Timur Tabi wrote:
> On Thu, Dec 7, 2017 at 11:29 AM, Prarit Bhargava <prarit@redhat.com> wrote:
>> -int __init acpi_parse_spcr(bool earlycon)
>> +int __init acpi_parse_spcr(bool earlycon, bool enable_console)
>>  {
>>         static char opts[ACPI_SPCR_OPTS_SIZE];
>>         static char uart[ACPI_SPCR_BUF_SIZE];
>> @@ -113,7 +113,8 @@ int __init acpi_parse_spcr(bool earlycon)
>>         if (earlycon)
>>                 setup_earlycon(opts);
>>
>> -       err = add_preferred_console(uart, 0, opts + strlen(uart) + 1);
>> +       if (enable_console)
>> +               err = add_preferred_console(uart, 0, opts + strlen(uart) + 1);
> 
> So if earlycon==true but enable_console==false, then you parse SPCR
> and use it for the early console, but not the primary console?  I'm
> not sure what that gives you.
> 

On arm64 the original SPCR code provides both early and primary consoles (as
you've pointed out).  IOW, if SPRC exists on arm64 a console will be
initialized.  That is still the case after my change.

The expected behaviour on x86 is that unless someone specifies 'earlycon' or
'console=' that no console should be initialized.  There are users (some IOT
boxes, etc.) that do NOT want a console.

The above code keeps the existing x86 behaviour.

P.

  reply	other threads:[~2017-12-07 19:03 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07 17:29 [PATCH 0/2] acpi, x86: Add SPCR table support Prarit Bhargava
2017-12-07 17:29 ` [PATCH 1/2] acpi, spcr: Make SPCR avialable to other architectures Prarit Bhargava
2017-12-07 18:43   ` Timur Tabi
2017-12-07 19:05     ` Prarit Bhargava
2017-12-07 19:35       ` Timur Tabi
2017-12-08 19:42     ` Prarit Bhargava
2017-12-07 17:29 ` [PATCH 2/2] acpi, x86: Use SPCR table for earlycon on x86 Prarit Bhargava
2017-12-07 18:46   ` Timur Tabi
2017-12-07 19:03     ` Prarit Bhargava [this message]
2017-12-08  6:29 ` [PATCH 0/2] acpi, x86: Add SPCR table support Ingo Molnar
2017-12-08 14:29   ` Prarit Bhargava
2017-12-08 15:31     ` Jeffrey Hugo
2017-12-08 16:02       ` Prarit Bhargava
2017-12-10 20:40     ` Jon Masters
2017-12-11 14:42     ` Ingo Molnar

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=c6ff196d-98e4-ab31-5d51-c342539afe96@redhat.com \
    --to=prarit@redhat.com \
    --cc=bhsharma@redhat.com \
    --cc=catalin.marinas@arm.com \
    --cc=corbet@lwn.net \
    --cc=hpa@zytor.com \
    --cc=jhugo@codeaurora.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lv.zheng@intel.com \
    --cc=mingo@redhat.com \
    --cc=rjw@rjwysocki.net \
    --cc=tglx@linutronix.de \
    --cc=timur@codeaurora.org \
    --cc=will.deacon@arm.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).