From nobody Mon Feb 9 07:42:24 2026 Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8447E332915 for ; Sat, 17 Jan 2026 07:28:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.175 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768634929; cv=none; b=YoCAgZ15Mha73dsfJl+mGfm50NeO1NcmN0DEG80mvMASKVCoLuCnrrXR7PGjPDJfRIXd+eC6oLO8EBY66Ic3/W5nZFWKmyJGQ7O+bmSoP31zh9sVjhrS1byEBtCLNnusc2y/FRDPKwEdcbY0EcvOon69stliJUf38VVO2+gp0ts= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768634929; c=relaxed/simple; bh=0dOjsz9/OTbsiieOE07EM6/GdvbrfPfmq+FYkav8ZqE=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=b0vvC7/fCGgzranXO0pUcLn34EkRpDd0q15jEZmaT0+Kxw2+PJfeS1HTM3JJjezrTaox9Rw7AIr8BZjJyJTdfOUkLDHlOzKPu8cKxXhpZGXDYQ39zWMluK1ME94Zl8b7Yvmgo5ro6MJV7usSLxOMLyPRjW3Vhvz0wAaXceEwZlU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=shenghaoyang.info; spf=pass smtp.mailfrom=shenghaoyang.info; dkim=pass (2048-bit key) header.d=shenghaoyang.info header.i=@shenghaoyang.info header.b=VkPx0hCy; arc=none smtp.client-ip=209.85.214.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=shenghaoyang.info Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=shenghaoyang.info Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=shenghaoyang.info header.i=@shenghaoyang.info header.b="VkPx0hCy" Received: by mail-pl1-f175.google.com with SMTP id d9443c01a7336-2a097cc08d5so5783645ad.0 for ; Fri, 16 Jan 2026 23:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shenghaoyang.info; s=google; t=1768634926; x=1769239726; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=h9HAJVA/qJVm3szfavq91Ie6LHNeib+qVQ+QzfxwkO8=; b=VkPx0hCyR+Ardk3SmvBKcHd16tEKL5d0DBtd+ralG9v4S4Eks1mkKYOSC/kPRKZxVF 9mo5klfXK3Bcjm0UYGVnUt9N5TI3aLk8Ws9uThdsay4qWuogFDGQUfjuPTG+V0btOV9B RCcjOE8D/cfTAekbk2xnZGD8xp7BHUqQdHNAQYTIqI8PJ8jzoCzE3yNl0gqyFvUQMtGL fwRfvZ22lzX+Z1n6e0YovPLvDtc2vvWE553sSzctsX5r20dw7caRj+kXK5yT4SVH8eaQ 2I20r+cpiwgZ2JoP31a9YcShIUU9lzK839XisxmRA0YtpWARqXQnPZYqVGJB8WSYwvTX fIqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768634926; x=1769239726; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=h9HAJVA/qJVm3szfavq91Ie6LHNeib+qVQ+QzfxwkO8=; b=QGD3aWRCTF4NiPPxbZLbcLBEK6oSMbjpvUVK5AGFgPuglA8giVHem5d+joiu68wEjc TVAOaeslFpBIfJH6MyphYOGKS5ewgig/GXWCxM7du+1tAcx4o8BCoiPKmKdj0q/tazWd Y86kQDH6J2WyxQ7X7eB4CDdSCPBm0kKIZPwO607kGzBMbhxf1TZ7W5ZqIB2tIhaR/Uqq LJYJYL4K8oh+8L9Y0lUI+Z8Uf9qcvkAj48Bb/Wq0plKOJxfqJvff9fkk1TP5IRi4mhgS 4sz1VnL3f7CJPdu+hzZCOKGEHBf5w/m69gC24x5ziOy9eF9SQN6tX2s7cG1u8S+NOoEP /+2w== X-Forwarded-Encrypted: i=1; AJvYcCXgx4gq2sxOd4F4tju9kd++pbkdoEAmMElZMgJXjGzusstN1HhbzyhapUxqOilUQjMxi3Z5zGqZy6fJJfc=@vger.kernel.org X-Gm-Message-State: AOJu0Yzfkz0P3xLPn8I7OyPmsoew1YmqpnnP9lXEYAxF7kjcxBvjFttF i3bUxhXBeNP0fszDrUZQO60VzL7kM/8qrIabaOo/C3Yg+3jrPXiuTSSiB9e+1E+iSc8= X-Gm-Gg: AY/fxX4sbw4vm0EF+KFmJQPZ8fWFqUYecOq7oCwwp/5YOnrSyAIjAy+zE0pvOU1yW0p 6UCzyaIT5i9zc/lLpSnxE+RHbkLGIYL/4dAufrq4cPGU5EkP2Jvw+/kgCgI4gLBTU6e3Uyexnn0 rmtyaZk3HGugVWFcFwaRHhnlGsS2SYuTaqHgC5NPkrOTic6MhbBRjF+okko0gRsMGZXu25MsSdu 7xDy3rxjxKHpaq1RcJ7hfKK84zSxMICRIAwDrLDZ6bOl2xidU0E99teNMQ1Xl+KgH+Ju0meSGFz aJ4KOlyPT/HFhrihIPU4RzKH13o/xHzbtphgpxsvnq7aTx8F6FDtZ6PKst+l8zEtKCDYkxulcGO /ebDPKRkDyKkVohRRyTD1ZH9h1LFlBNBTEKksKRBSGDZYvr40fmptt10vqS4o8u5rTTAqEgwUVy yM6nP/r5Bo X-Received: by 2002:a17:90b:58e4:b0:340:b8f2:250c with SMTP id 98e67ed59e1d1-35272ec84efmr3763296a91.1.1768634926224; Fri, 16 Jan 2026 23:28:46 -0800 (PST) Received: from localhost ([132.147.84.99]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-c5edf32d68asm3686559a12.18.2026.01.16.23.28.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 16 Jan 2026 23:28:45 -0800 (PST) From: Shenghao Yang To: x86@kernel.org Cc: Jonathan Corbet , "Rafael J. Wysocki" , Len Brown , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, Shenghao Yang Subject: [PATCH v2] x86/acpi: Add acpi=spcr to use SPCR-provided default console Date: Sat, 17 Jan 2026 15:28:27 +0800 Message-ID: <20260117072827.355360-1-me@shenghaoyang.info> X-Mailer: git-send-email 2.52.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The SPCR provided console on x86 is only available as a boot console when earlycon is provided on the kernel command line, and will not be present in /proc/consoles. While it's possible to retain the boot console with the keep_bootcon parameter, that leaves the console using the less efficient 8250_early driver. Users wanting to use the firmware suggested console (to avoid maintaining unique serial console parameters for different server models in large fleets) with the conventional driver have to parse the kernel log for the console parameters and reinsert them. [ 0.005091] ACPI: SPCR 0x000000007FFB5000 000059 (v04 ALASKA A M I 01= 072009 INTL 20250404) [ 0.073387] ACPI: SPCR: console: uart,io,0x3f8,115200 In commit 0231d00082f6 ("ACPI: SPCR: Make SPCR available to x86") [1] the SPCR console was only added as an option for earlycon but not as an ordinary console so users don't see console output changes. So users can opt in to an automatic SPCR console, make ACPI init add it if acpi=3Dspcr is set. [1]: https://lore.kernel.org/lkml/20180118150951.28964-1-prarit@redhat.com/ Signed-off-by: Shenghao Yang --- v2: Reworded commit with more detail. [v1]: https://lore.kernel.org/lkml/20251228092222.130954-1-me@shenghaoyang.= info/ Documentation/admin-guide/kernel-parameters.txt | 2 ++ arch/x86/kernel/acpi/boot.c | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentatio= n/admin-guide/kernel-parameters.txt index 1058f2a6d6a8..9b65ec0b5e0a 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -125,6 +125,8 @@ Kernel parameters may result in duplicate corrected error reports. nospcr -- disable console in ACPI SPCR table as default _serial_ console on ARM64 + spcr -- enable console in ACPI SPCR table as + default _serial_ console on X86 For ARM64, ONLY "acpi=3Doff", "acpi=3Don", "acpi=3Dforce" or "acpi=3Dnospcr" are available For RISCV64, ONLY "acpi=3Doff", "acpi=3Don" or "acpi=3Dforce" diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c index 9fa321a95eb3..83bbfa1d6f1f 100644 --- a/arch/x86/kernel/acpi/boot.c +++ b/arch/x86/kernel/acpi/boot.c @@ -47,6 +47,7 @@ EXPORT_SYMBOL(acpi_disabled); =20 int acpi_noirq; /* skip ACPI IRQ initialization */ static int acpi_nobgrt; /* skip ACPI BGRT */ +static int acpi_spcr_add __initdata; /* add SPCR-provided console */ int acpi_pci_disabled; /* skip ACPI PCI scan and IRQ initialization */ EXPORT_SYMBOL(acpi_pci_disabled); =20 @@ -1666,7 +1667,7 @@ int __init acpi_boot_init(void) x86_init.pci.init =3D pci_acpi_init; =20 /* Do not enable ACPI SPCR console by default */ - acpi_parse_spcr(earlycon_acpi_spcr_enable, false); + acpi_parse_spcr(earlycon_acpi_spcr_enable, acpi_spcr_add); return 0; } =20 @@ -1703,6 +1704,10 @@ static int __init parse_acpi(char *arg) /* "acpi=3Dnocmcff" disables FF mode for corrected errors */ else if (strcmp(arg, "nocmcff") =3D=3D 0) { acpi_disable_cmcff =3D 1; + } + /* "acpi=3Dspcr" adds the SPCR-provided console as a preferred one */ + else if (strcmp(arg, "spcr") =3D=3D 0) { + acpi_spcr_add =3D 1; } else { /* Core will printk when we return error. */ return -EINVAL; --=20 2.52.0