[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] drivers/char: Check if console=dtuart for ACPI SPCR serial bring up
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Michal Orzel <michal.orzel@xxxxxxx>
- Date: Wed, 2 Sep 2026 09:36:05 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=T0Km7Tc1xeK6Y+oTde3bVSSHLb0d+PMC+KbuvBwG/aM=; b=HujfN4uzT9W7d0GdV/nXy9usB04kHIrD3uX5ZNQPdNPpKB0gk6JgML/lSfBftNZfIN6av93BYuTRSqRdpp3BcdzMLjr4vLkyxutxplLs/xlQVVtipfN4gT7htrpyMxQViN/FhYtpxsejVqI92tvF9lbSFHKbj8jnSzDuf9YSQ0uQML+EdyjD5jS1/oRPhsDMqqQIRMzuTn8mTEJ/ZJW/o9BORrL5WRCpHx3Lnodv35FZbsAVF7AINuDPj0fHoy1WaW2Ejx39ZnZ60NXQX6GdR2gp09Xtg6MKmX5CpgNHSJqMt/nzetHijKHX1rQVJVte2UKkJLtUBhJm8mdi1BQJTg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ruiZ55ql3MHuqd4kyhExdrhBVftriaLYAD+O/sZi7YkSA9t5frXV92mABVBkvDW+JSqZUcuvvw9jYCuC1jE8aPQCeFLnhhLk2PSpiNx5FsAoUkiBBCEkxtWmxHH7ub3y93WbYqYppfycAowjsAT4CqGXQad8ZlV4U7fg7LjR761ZXXo0xkPIWFU4Oq4hsm4VJCmG13lY6ug/PItsh1vxJs+eknIuZiEqeEcZpkoIabLplrjYlPYy53+os+9X5XepsiG325kXiYL0EG6qecZXmr0s+x/oyrGXmgP23pp/Z9Hd5bQvTUTiEmCtsOan1+bWpSGBAYSiH+FE3bHtxRG1qA==
- Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
- Cc: Michal Orzel <michal.orzel@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, Roger Pau Monné <roger@xxxxxxxxxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>
- Delivery-date: Wed, 02 Sep 2026 07:36:27 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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>
---
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
|