From 12b136a965ce5a841ef9a9efb9c91d08661949d4 Mon Sep 17 00:00:00 2001 From: Michal Orzel Date: Wed, 2 Sep 2026 09:36:05 +0200 Subject: [PATCH] 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 Reviewed-by: Jan Beulich --- xen/drivers/char/uart-init.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xen/drivers/char/uart-init.c b/xen/drivers/char/uart-init.c index a218139938..eb7f855495 100644 --- a/xen/drivers/char/uart-init.c +++ b/xen/drivers/char/uart-init.c @@ -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