Skip to contentSkip to conversation

arm64: acpi: Fix incorrect check for default console message

PATCH In review Punit Agrawal 3 participants 4 messages Oct 27, 2025 – Nov 21, 2025 arm64

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm64: acpi: Fix incorrect check for default console message

bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent") mistakenly assumes acpi_parse_spcr() returning 0 to indicate a failure to parse SPCR and prints a message to the kernel logs accordingly. In reality acpi_parse_spcr() returns 0 on success and -ERRNO on failure.

Fix the faulty check to output the correct logging message.

Fixes bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent")

---
Hi,

After sending a patch to fix incorrect parsing of SPCR[0], I was still seeing inconsistent logging on arm64. The result is this nugget.

Considering the pointless churn - I wondered if it isn't better to drop the message? If others agree, I can send a patch (and revert bad3fa2fb920 while at it).

Thanks,
Punit

[0] https://lore.kernel.org/all/[email protected]/

 arch/arm64/kernel/acpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/acpi.c +1 -1
index 7aca29e1d30b..2fba72d51d71 100644
@@ -254,7 +254,7 @@ void __init acpi_boot_table_init(void)
 		 */
 		ret = acpi_parse_spcr(earlycon_acpi_spcr_enable,
 			!param_acpi_nospcr);
-		if (!ret || param_acpi_nospcr || !IS_ENABLED(CONFIG_ACPI_SPCR_TABLE))
+		if (ret < 0 || param_acpi_nospcr || !IS_ENABLED(CONFIG_ACPI_SPCR_TABLE))
 			pr_info("Use ACPI SPCR as default console: No\n");
 		else
 			pr_info("Use ACPI SPCR as default console: Yes\n");
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 13 lines · Punit Agrawal

bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent") mistakenly assumes acpi_parse_spcr() returning 0 to indicate a failure to parse SPCR and prints a message to the kernel logs accordingly. In reality acpi_parse_spcr() returns 0 on success and -ERRNO on failure.

Fix the faulty check to output the correct logging message.

Fixes bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent")

---
Hi,

Quoted 6 lines

After sending a patch to fix incorrect parsing of SPCR[0], I was still seeing inconsistent logging on arm64. The result is this nugget.

Considering the pointless churn - I wondered if it isn't better to drop the message? If others agree, I can send a patch (and revert bad3fa2fb920 while at it).

I'd be happy dropping the message as it looks pretty useless to me, especially given that the current logic is broken.

Will

#2 lore raw
Quoted 17 lines · Will Deacon
Quoted 16 lines · Punit Agrawal

bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent") mistakenly assumes acpi_parse_spcr() returning 0 to indicate a failure to parse SPCR and prints a message to the kernel logs accordingly. In reality acpi_parse_spcr() returns 0 on success and -ERRNO on failure.

Fix the faulty check to output the correct logging message.

Fixes bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent")

---
Hi,

After sending a patch to fix incorrect parsing of SPCR[0], I was still seeing inconsistent logging on arm64. The result is this nugget.

Quoted 6 lines
Quoted 3 lines

Considering the pointless churn - I wondered if it isn't better to drop the message? If others agree, I can send a patch (and revert bad3fa2fb920 while at it).

I'd be happy dropping the message as it looks pretty useless to me, especially given that the current logic is broken.

Fine with me as well, in the acpi_parse_spcr() there is a default pr_info() for the console information, we can drop it here.

Thanks
Hanjun

#3 lore raw

Hi Hanjun,

Quoted 18 lines · Hanjun Guo
Quoted 17 lines · Will Deacon
Quoted 16 lines · Punit Agrawal

bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent") mistakenly assumes acpi_parse_spcr() returning 0 to indicate a failure to parse SPCR and prints a message to the kernel logs accordingly. In reality acpi_parse_spcr() returns 0 on success and -ERRNO on failure.

Fix the faulty check to output the correct logging message.

Fixes bad3fa2fb920 ("ACPI: Suppress misleading SPCR console message when SPCR table is absent")

---
Hi,

After sending a patch to fix incorrect parsing of SPCR[0], I was still seeing inconsistent logging on arm64. The result is this nugget.

Quoted 8 lines
Quoted 5 lines
Quoted 3 lines

Considering the pointless churn - I wondered if it isn't better to drop the message? If others agree, I can send a patch (and revert bad3fa2fb920 while at it).

I'd be happy dropping the message as it looks pretty useless to me, especially given that the current logic is broken.

Fine with me as well, in the acpi_parse_spcr() there is a default pr_info() for the console information, we can drop it here.

Thanks! I sent a follow up[0] that's been picked up as a fix for v6.18 (already merged).

[0] https://lore.kernel.org/all/[email protected]/