drivers/char: Check if console=dtuart for ACPI SPCR serial bring up

dtuart denotes a generic UART parsed from a device tree (back then it
was the only method, hence dt prefix) or ACPI SPCR table (they all use
the SERHND_DTUART serial handle). Currently we only check if console= is
set to dtuart in the DT flow and not in the ACPI flow. This means that
even if we set console=none we would still bring up ACPI parsed
serial device for nothing. Move the check to uart_init() to cover both
paths.

Signed-off-by: Michal Orzel <michal.orzel@amd.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
This commit is contained in:
Michal Orzel committed 2026-09-15 17:13:02 +02:00
1 parent 422484e55c
commit 12b136a965
1 file changed
+3 -3
+3 -3
View File
@@ -38,9 +38,6 @@ static void __init dt_uart_init(void)
const char *options;
char *split;
if ( !console_has("dtuart") )
return; /* Not for us */
if ( !strcmp(opt_dtuart, "") )
{
const struct dt_device_node *chosen = dt_find_node_by_path("/chosen");
@@ -121,6 +118,9 @@ static void __init acpi_uart_init(void) { }
void __init uart_init(void)
{
if ( !console_has("dtuart") )
return; /* Not for us */
if ( acpi_disabled )
dt_uart_init();
else
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.