* [PATCH] arm64: acpi: Fix incorrect check for default console message
@ 2025-10-27 14:19 Punit Agrawal
2025-10-30 14:21 ` Will Deacon
0 siblings, 1 reply; 4+ messages in thread
From: Punit Agrawal @ 2025-10-27 14:19 UTC (permalink / raw)
To: catalin.marinas, will
Cc: guohanjun, chenl311, linux-arm-kernel, linux-kernel,
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")
Signed-off-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
---
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/20251024123125.1081612-1-punit.agrawal@oss.qualcomm.com/
arch/arm64/kernel/acpi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/kernel/acpi.c
index 7aca29e1d30b..2fba72d51d71 100644
--- a/arch/arm64/kernel/acpi.c
+++ b/arch/arm64/kernel/acpi.c
@@ -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");
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: acpi: Fix incorrect check for default console message
2025-10-27 14:19 [PATCH] arm64: acpi: Fix incorrect check for default console message Punit Agrawal
@ 2025-10-30 14:21 ` Will Deacon
2025-11-21 2:40 ` Hanjun Guo
0 siblings, 1 reply; 4+ messages in thread
From: Will Deacon @ 2025-10-30 14:21 UTC (permalink / raw)
To: Punit Agrawal
Cc: catalin.marinas, guohanjun, chenl311, linux-arm-kernel,
linux-kernel
On Mon, Oct 27, 2025 at 02:19:41PM +0000, Punit Agrawal wrote:
> 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")
> Signed-off-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
> ---
> 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).
I'd be happy dropping the message as it looks pretty useless to me,
especially given that the current logic is broken.
Will
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: acpi: Fix incorrect check for default console message
2025-10-30 14:21 ` Will Deacon
@ 2025-11-21 2:40 ` Hanjun Guo
2025-11-21 13:44 ` Punit Agrawal
0 siblings, 1 reply; 4+ messages in thread
From: Hanjun Guo @ 2025-11-21 2:40 UTC (permalink / raw)
To: Will Deacon, Punit Agrawal
Cc: catalin.marinas, chenl311, linux-arm-kernel, linux-kernel
On 2025/10/30 22:21, Will Deacon wrote:
> On Mon, Oct 27, 2025 at 02:19:41PM +0000, Punit Agrawal wrote:
>> 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")
>> Signed-off-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
>> ---
>> 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).
>
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: acpi: Fix incorrect check for default console message
2025-11-21 2:40 ` Hanjun Guo
@ 2025-11-21 13:44 ` Punit Agrawal
0 siblings, 0 replies; 4+ messages in thread
From: Punit Agrawal @ 2025-11-21 13:44 UTC (permalink / raw)
To: Hanjun Guo
Cc: Will Deacon, Punit Agrawal, catalin.marinas, chenl311,
linux-arm-kernel, linux-kernel
Hi Hanjun,
Hanjun Guo <guohanjun@huawei.com> writes:
> On 2025/10/30 22:21, Will Deacon wrote:
>> On Mon, Oct 27, 2025 at 02:19:41PM +0000, Punit Agrawal wrote:
>>> 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")
>>> Signed-off-by: Punit Agrawal <punit.agrawal@oss.qualcomm.com>
>>> ---
>>> 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).
>> 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/20251031111138.1262202-1-punit.agrawal@oss.qualcomm.com/
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-21 13:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-27 14:19 [PATCH] arm64: acpi: Fix incorrect check for default console message Punit Agrawal
2025-10-30 14:21 ` Will Deacon
2025-11-21 2:40 ` Hanjun Guo
2025-11-21 13:44 ` Punit Agrawal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).