From: "Arnd Bergmann" <arnd@arndb.de>
To: "Thorsten Blum" <thorsten.blum@linux.dev>,
"Thomas Gleixner" <tglx@kernel.org>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"Dave Hansen" <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: linux-kernel@vger.kernel.org, Linux-Arch <linux-arch@vger.kernel.org>
Subject: Re: [PATCH] x86/serial: Use generic BASE_BAUD in asm/serial.h
Date: Fri, 17 Jul 2026 11:06:03 +0200 [thread overview]
Message-ID: <962ac8f0-a7fc-4a80-ac3d-aeaff82d34d3@app.fastmail.com> (raw)
In-Reply-To: <20260717073149.3622-3-thorsten.blum@linux.dev>
On Fri, Jul 17, 2026, at 09:31, Thorsten Blum wrote:
> /*
> - * This should not be an architecture specific #define, oh well.
> - *
> - * Traditionally, it just describes i8250 and related serial ports
> - * that have this clock rate.
> + * Default base baud for i8250 and related serial ports using a
> + * 1.8432 MHz UART clock.
> */
You remove the important bit here, which is that we shouldn't need
the definition in the first place.
Among the current references
arch/arc/include/asm/serial.h:#define BASE_BAUD arc_early_base_baud()
arch/arm/mach-omap1/board-ams-delta.c: .uartclk = BASE_BAUD * 16,
arch/loongarch/include/asm/serial.h:#define BASE_BAUD 0
arch/openrisc/include/asm/serial.h:#define BASE_BAUD (cpuinfo_or1k[smp_processor_id()].clock_frequency/16)
arch/powerpc/include/asm/serial.h:#define BASE_BAUD ( 1843200 / 16 )
arch/powerpc/kernel/legacy_serial.c: u32 clock = BASE_BAUD * 16;
arch/x86/boot/early_serial_console.c:#define BASE_BAUD (1843200/16)
arch/x86/boot/early_serial_console.c: return BASE_BAUD / quot;
arch/xtensa/platforms/iss/include/platform/serial.h:#define BASE_BAUD 0
arch/xtensa/platforms/xt2000/include/platform/serial.h:#define BASE_BAUD ( DUART16552_XTAL_FREQ / 16 )
arch/xtensa/platforms/xtfpga/include/platform/serial.h:#define BASE_BAUD (*(long *)XTFPGA_CLKFRQ_VADDR / 16)
drivers/tty/serial/earlycon.c: port->uartclk = BASE_BAUD * 16;
include/asm-generic/serial.h:#define BASE_BAUD (1843200 / 16)
the only thing actually using it is the earlycon="..." command line
parsing. As far as I can tell, everyone sets it to the generic
value, except for loongarch/xtensa-iss using 0 to make 8250-early not
override the default from the boot loader and arc/openrisc trying
to do runtime detection. The arc/openrisc case can probably be fixed
by just defining the clocks correctly in the dts files and using
chosen/stdout-path instead of the open-coded earlycon settings.
There is probably also a better solution to deal with the
BASE_BAUD=0 case in an architecture-independent way.
I should also dig out my old series that turns the architecture
specific SERIAL_PORT_DFNS macro into a regular driver.
Arnd
prev parent reply other threads:[~2026-07-17 9:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-17 7:31 Thorsten Blum
2026-07-17 9:06 ` Arnd Bergmann [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=962ac8f0-a7fc-4a80-ac3d-aeaff82d34d3@app.fastmail.com \
--to=arnd@arndb.de \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@kernel.org \
--cc=thorsten.blum@linux.dev \
--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