[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] drivers/char: Check if console=dtuart for ACPI SPCR serial bring up



commit 12b136a965ce5a841ef9a9efb9c91d08661949d4
Author:     Michal Orzel <michal.orzel@xxxxxxx>
AuthorDate: Wed Sep 2 09:36:05 2026 +0200
Commit:     Michal Orzel <michal.orzel@xxxxxxx>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    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@xxxxxxx>
    Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 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
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.