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 <[email protected]> --- 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 a2181399389f..eb7f85549593 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 -- 2.43.0
