Hi Greg,
On 2025/8/18 20:44, Greg Kroah-Hartman wrote:
6.12-stable review patch. If anyone has any objections, please let me know.
From: Li Chen chenl311@chinatelecom.cn
[ Upstream commit bad3fa2fb9206f4dcec6ddef094ec2fbf6e8dcb2 ]
The kernel currently alway prints: "Use ACPI SPCR as default console: No/Yes"
even on systems that lack an SPCR table. This can mislead users into thinking the SPCR table exists on the machines without SPCR.
With this change, the "Yes" is only printed if the SPCR table is present, parsed and !param_acpi_nospcr. This avoids user confusion on SPCR-less systems.
Signed-off-by: Li Chen chenl311@chinatelecom.cn Acked-by: Hanjun Guo guohanjun@huawei.com Link: https://lore.kernel.org/r/20250620131309.126555-3-me@linux.beauty Signed-off-by: Catalin Marinas catalin.marinas@arm.com Signed-off-by: Sasha Levin sashal@kernel.org
arch/arm64/kernel/acpi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c index e6f66491fbe9..862bb1cba4f0 100644 --- a/arch/arm64/kernel/acpi.c +++ b/arch/arm64/kernel/acpi.c @@ -197,6 +197,8 @@ static int __init acpi_fadt_sanity_check(void) */ void __init acpi_boot_table_init(void) {
- int ret;
- /*
- Enable ACPI instead of device tree unless
- ACPI has been disabled explicitly (acpi=off), or
@@ -250,10 +252,12 @@ void __init acpi_boot_table_init(void) * behaviour, use acpi=nospcr to disable console in ACPI SPCR * table as default serial console. */
acpi_parse_spcr(earlycon_acpi_spcr_enable,
ret = acpi_parse_spcr(earlycon_acpi_spcr_enable, !param_acpi_nospcr);
pr_info("Use ACPI SPCR as default console: %s\n",
param_acpi_nospcr ? "No" : "Yes");
if (!ret || param_acpi_nospcr || !IS_ENABLED(CONFIG_ACPI_SPCR_TABLE))
We also need to backport this preparing patch:
b9f58d3572a8 ACPI: Return -ENODEV from acpi_parse_spcr() when SPCR support is disabled
Or it will print the wrong message.
It applies for 6.15 and 6.16 kernel as well.
Thanks Hanjun