[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0httK0xmvA5zcYruU1Ypsw1YXHBOaPQxwCai8YDLsGkvA@mail.gmail.com>
Date: Mon, 27 Oct 2025 19:25:43 +0100
From: "Rafael J. Wysocki" <rafael@...nel.org>
To: "Shang song (Lenovo)" <shangsong2@...mail.com>
Cc: "Rafael J . Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org, shangsong2@...ovo.com
Subject: Re: [PATCH 1/1] ACPI: PRM: Skip the initialization when boot from
legacy BIOS
On Mon, Oct 13, 2025 at 10:38 AM Shang song (Lenovo)
<shangsong2@...mail.com> wrote:
>
> 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 check removed by this change addresses a different case than the
similar check in init_prmt(), so removing it when relocating the other
check is questionable.
Please limit this patch to the init_prmt() changes.
> /*
> * 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.
> + */
One-line comment would be sufficient here.
> + 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,
> --
Powered by blists - more mailing lists