From: Randy Dunlap <rdunlap@infradead.org>
To: Daniel Kurtz <djkurtz@chromium.org>
Cc: adurbin@chromium.org, Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, Kate Stewart <kstewart@linuxfoundation.org>,
Philippe Ombredanne <pombredanne@nexb.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] x86/Kconfig: Add config to allow not defining old serial ports
Date: Wed, 7 Mar 2018 17:49:14 -0800 [thread overview]
Message-ID: <eb1a687d-43ba-3a48-52f7-716963ba6a1c@infradead.org> (raw)
In-Reply-To: <20180307232410.248434-3-djkurtz@chromium.org>
On 03/07/2018 03:24 PM, Daniel Kurtz wrote:
> The old_serial_port global array in 8250_core is supposed to hold an entry
> for each serial port on the system that cannot be discovered via a
> standard enumeration mechanism (aka ACPI/PCI/DTS). The array is populated
> at compile-time from the value specified in the SERIAL_PORT_DFNS macro.
> This macro is defined in arch/serial.h.
>
> For x86, this macro is currently unconditionally initialized to supply
> four ioport UARTs (0x3F8, 0x2F8, 0x3E8, 0x2E8).
>
> However, not all x86 CPUs have these four ioport UARTs. For example, the
> UARTs on AMD Carrizo and later are separate memory mapped Designware IP
> blocks.
>
> Fairly early in boot the console_initcall univ8250_console_init iterates
> over this array and installs these old UARTs into the global array
> serial8250_ports. Further, it attemptes to register them for use as
> the console. In other words, if, for example, the kernel commandline has
> console=ttyS0, the console will be switched over to one of these
> non-existent UARTs. Only later, when the real UART drivers are probed
> and their devices are instantiated will the console switch back over to
> the proper UART.
>
> This is most noticeable when using earlycon, since part of the serial
> console log will appear to disappear (when the bogus old takes over) and
> then re-appear (when the real UART finally gets registered for the
> console).
>
> Add a Kconfig option to allow overriding this default hard coded value
> for arch/x86 devices that do not have such serial ports.
>
> Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
> ---
> arch/x86/Kconfig | 11 +++++++++++
> arch/x86/include/asm/serial.h | 4 ++++
> 2 files changed, 15 insertions(+)
>
> diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> index 0a258bb30159..7501cd776cfc 100644
> --- a/arch/x86/Kconfig
> +++ b/arch/x86/Kconfig
> @@ -463,6 +463,17 @@ config X86_SERIAL_BASE_BAUD
> default, but may need to be changed to get earlycon to work on
> some hardware, such as those that use AMD Carrizo or later SoCs.
>
> +config X86_SERIAL_DEFINE_OLD_SERIAL_PORTS
> + bool "Define un-enumerable serial ports"
> + default y
> + help
> + Say Y here if you want the kernel to assume the precense of built-in
presence
> + serial ports that do not have a standard enumeration mechanism.
> + Platforms that can find all serial ports via mechanisms like ACPI or
> + PCI can set this to N.
> +
> + If unsure, say Y.
> +
> if X86_32
> config X86_BIGSMP
> bool "Support for big SMP systems with more than 8 CPUs"
--
~Randy
prev parent reply other threads:[~2018-03-08 1:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20180307232410.248434-1-djkurtz@chromium.org>
2018-03-07 23:24 ` [PATCH 1/2] x86/Kconfig: Add config for specifying BASE_BAUD Daniel Kurtz
2018-03-12 16:54 ` Andy Shevchenko
2018-03-07 23:24 ` [PATCH 2/2] x86/Kconfig: Add config to allow not defining old serial ports Daniel Kurtz
2018-03-08 1:49 ` Randy Dunlap [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=eb1a687d-43ba-3a48-52f7-716963ba6a1c@infradead.org \
--to=rdunlap@infradead.org \
--cc=adurbin@chromium.org \
--cc=djkurtz@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
--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).