[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <176866997362.510.10737848539349754089.tip-bot2@tip-bot2>
Date: Sat, 17 Jan 2026 17:12:53 -0000
From: "tip-bot2 for Shenghao Yang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Shenghao Yang <me@...nghaoyang.info>,
"Borislav Petkov (AMD)" <bp@...en8.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject:
[tip: x86/boot] x86/acpi: Add acpi=spcr to use SPCR-provided default console
The following commit has been merged into the x86/boot branch of tip:
Commit-ID: 2a11e1479ef07519bfd6b64ee276905ca84cf817
Gitweb: https://git.kernel.org/tip/2a11e1479ef07519bfd6b64ee276905ca84cf817
Author: Shenghao Yang <me@...nghaoyang.info>
AuthorDate: Sat, 17 Jan 2026 15:28:27 +08:00
Committer: Borislav Petkov (AMD) <bp@...en8.de>
CommitterDate: Sat, 17 Jan 2026 17:43:21 +01:00
x86/acpi: Add acpi=spcr to use SPCR-provided default console
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 01072009 INTL 20250404)
[ 0.073387] ACPI: SPCR: console: uart,io,0x3f8,115200
In commit
0231d00082f6 ("ACPI: SPCR: Make SPCR available to x86")¹
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=spcr is set.
¹https://lore.kernel.org/lkml/20180118150951.28964-1-prarit@redhat.com/
[ bp: Touchups. ]
Signed-off-by: Shenghao Yang <me@...nghaoyang.info>
Signed-off-by: Borislav Petkov (AMD) <bp@...en8.de>
Link: https://patch.msgid.link/20260117072827.355360-1-me@shenghaoyang.info
---
Documentation/admin-guide/kernel-parameters.txt | 2 ++
arch/x86/kernel/acpi/boot.c | 11 ++++++++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
index a8d0afd..4d2f0bf 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=off", "acpi=on", "acpi=force" or
"acpi=nospcr" are available
For RISCV64, ONLY "acpi=off", "acpi=on" or "acpi=force"
diff --git a/arch/x86/kernel/acpi/boot.c b/arch/x86/kernel/acpi/boot.c
index d6138b2..a3f2fb1 100644
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -48,7 +48,8 @@ EXPORT_SYMBOL(acpi_disabled);
int acpi_noirq; /* skip ACPI IRQ initialization */
static int acpi_nobgrt; /* skip ACPI BGRT */
-int acpi_pci_disabled; /* skip ACPI PCI scan and IRQ initialization */
+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);
int acpi_lapic;
@@ -1669,8 +1670,8 @@ int __init acpi_boot_init(void)
if (!acpi_noirq)
x86_init.pci.init = pci_acpi_init;
- /* 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;
}
@@ -1707,6 +1708,10 @@ static int __init parse_acpi(char *arg)
/* "acpi=nocmcff" disables FF mode for corrected errors */
else if (strcmp(arg, "nocmcff") == 0) {
acpi_disable_cmcff = 1;
+ }
+ /* "acpi=spcr" adds the SPCR-provided console as a preferred one */
+ else if (strcmp(arg, "spcr") == 0) {
+ acpi_spcr_add = 1;
} else {
/* Core will printk when we return error. */
return -EINVAL;
Powered by blists - more mailing lists