[<prev] [next>] [day] [month] [year] [list]
Message-ID: <tencent_EAFBEC2D1967D73F4F76B8048D2F59BB1105@qq.com>
Date: Mon, 13 Oct 2025 04:31:40 -0400
From: "Shang song (Lenovo)" <shangsong2@...mail.com>
To: "Rafael J . Wysocki" <rafael@...nel.org>
Cc: Len Brown <lenb@...nel.org>,
linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org,
shangsong2@...ovo.com,
"Shang song (Lenovo)" <shangsong2@...mail.com>
Subject: [PATCH 1/1] ACPI: PRM: Skip the initialization when boot from legacy BIOS
To address the confusion caused by the misleading "Failed to find VA for GUID..."
message during legacy BIOS boot, making 'EFI_RUNTIME_SERVICES's earlier judgment
can prevent this false alert.
Signed-off-by: Shang song (Lenovo) <shangsong2@...mail.com>
---
drivers/acpi/prmt.c | 18 ++++++++----------
1 file changed, 8 insertions(+), 10 deletions(-)
diff --git a/drivers/acpi/prmt.c b/drivers/acpi/prmt.c
index 6792d4385eee..ec367d322ab2 100644
--- a/drivers/acpi/prmt.c
+++ b/drivers/acpi/prmt.c
@@ -305,11 +305,6 @@ static acpi_status acpi_platformrt_space_handler(u32 function,
efi_status_t status;
struct prm_context_buffer context;
- if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
- pr_err_ratelimited("PRM: EFI runtime services no longer available\n");
- return AE_NO_HANDLER;
- }
-
/*
* The returned acpi_status will always be AE_OK. Error values will be
* saved in the first byte of the PRM message buffer to be used by ASL.
@@ -388,6 +383,14 @@ void __init init_prmt(void)
acpi_status status;
int mc;
+ /*
+ * Return immediately if EFI_RUNTIME_SERVICES is not enabled.
+ */
+ if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
+ pr_info("PRM: EFI runtime services unavailable, can not initialize.\n");
+ return;
+ }
+
status = acpi_get_table(ACPI_SIG_PRMT, 0, &tbl);
if (ACPI_FAILURE(status))
return;
@@ -404,11 +407,6 @@ void __init init_prmt(void)
pr_info("PRM: found %u modules\n", mc);
- if (!efi_enabled(EFI_RUNTIME_SERVICES)) {
- pr_err("PRM: EFI runtime services unavailable\n");
- return;
- }
-
status = acpi_install_address_space_handler(ACPI_ROOT_OBJECT,
ACPI_ADR_SPACE_PLATFORM_RT,
&acpi_platformrt_space_handler,
--
2.43.7
Powered by blists - more mailing lists