Skip to contentSkip to conversation

ACPI:PRM: Reduce unnecessary printing to avoid the worries of regular users

PATCH Superseded Zhu Qiyu 2 participants 3 messages May 12, 2025 – May 18, 2025 ACPI

v3 of 6 Superseded Latest is v6 →

lore
Share & tools
lore

Zhu Qiyu

author
#0 lore raw

PATCH v3 1/1 ACPI:PRM: Reduce unnecessary printing to avoid the worries of regular users

Commit 088984c8d54c ("ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context") introduces non-essential printing "Failed to find VA for GUID: 7626C6AE-F973-429C-A91C-107D7BE298B0, PA: 0x0" which causes unnecessary worry for regular users.

Refer to PRM Spec Section 4.1.2[1], both static data buffer address and ACPI parameter buffer address may be NULL if they are not needed. So there is no need to print out "Failed to find VA ... " to intimidate regular users.

---

Previous versions can be found at:
v1: https://lore.kernel.org/linux-acpi/CAJZ5v0hv0WKd-SXFhUgYs-Zpc+-PsSNOBu0r7L5TzJWgddtsKA@mail.gmail.com/t/#u
v2: https://lore.kernel.org/linux-acpi/[email protected]/#r

Changes in v2:
- Reduce the code changes.
Changes in v3:
- Fixed title letters not showing.

 drivers/acpi/prmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/prmt.c +1 -1
index e549914a636c..28a9930267a3 100644
@@ -85,7 +85,7 @@ static u64 efi_pa_va_lookup(efi_guid_t *guid, u64 pa)
 		}
 	}
 
-	pr_warn("Failed to find VA for GUID: %pUL, PA: 0x%llx", guid, pa);
+	pr_info("VA for GUID: %pUL, PA: 0x%llx not found\n", guid, pa);
 
 	return 0;
 }

base-commit: 92a09c47464d040866cf2b4cd052bc60555185fb

Signature · 1 line
2.43.0
#1 lore raw
Quoted 33 lines · Zhu Qiyu

Commit 088984c8d54c ("ACPI: PRM: Find EFI_MEMORY_RUNTIME block for PRM handler and context") introduces non-essential printing "Failed to find VA for GUID: 7626C6AE-F973-429C-A91C-107D7BE298B0, PA: 0x0" which causes unnecessary worry for regular users.

Refer to PRM Spec Section 4.1.2[1], both static data buffer address and ACPI parameter buffer address may be NULL if they are not needed. So there is no need to print out "Failed to find VA ... " to intimidate regular users.

---

Previous versions can be found at:
v1: https://lore.kernel.org/linux-acpi/CAJZ5v0hv0WKd-SXFhUgYs-Zpc+-PsSNOBu0r7L5TzJWgddtsKA@mail.gmail.com/t/#u
v2: https://lore.kernel.org/linux-acpi/[email protected]/#r

Changes in v2:
- Reduce the code changes.
Changes in v3:
- Fixed title letters not showing.

 drivers/acpi/prmt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/prmt.c +0 -0
index e549914a636c..28a9930267a3 100644

drivers/acpi/prmt.c static u64 efi_pa_va_lookup(efi_guid_t *guid, u64 pa) · line 88

Quoted 5 lines
drivers/acpi/prmt.c +1 -1
@@ -85,7 +85,7 @@ static u64 efi_pa_va_lookup(efi_guid_t *guid, u64 pa)
                }
        }
 
-       pr_warn("Failed to find VA for GUID: %pUL, PA: 0x%llx", guid, pa);
+       pr_info("VA for GUID: %pUL, PA: 0x%llx not found\n", guid, pa);

Thanks for following my advice, but on second thought, it would be good to discard the message entirely if pa is zero and it is valid by the spac, but still complain if pa is nonzero and it cannot be mapped.

So what about doing something like this in acpi_parse_prmt():

if (handler_info->static_data_buffer_address)

        th->static_data_buffer_addr = efi_pa_va_lookup(&th->guid,
handler_info->static_data_buffer_address);
else
        th->static_data_buffer_addr = 0;

and analogously for th->acpi_param_buffer_addr()?

Quoted 6 lines
drivers/acpi/prmt.c +0 -0
        return 0;
 }
 

base-commit: 92a09c47464d040866cf2b4cd052bc60555185fb --

author
#2 lore raw

Hi Rafael,

Thanks for the suggestion, so we can only print the warning when the th->handler_addr is zero, and for
th->static_data_buffer_addr and th->acpi_param_buffer_addr, efi_pa_va_lookup() will return zero if they are not necessary.

Patch v4 has been sent, please review.
https://lore.kernel.org/linux-acpi/[email protected]/T/#u

BRs
Zhu Qiyu