From: "lihuisong (C)" <lihuisong@huawei.com>
To: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: <lenb@kernel.org>, <linux-acpi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <Sudeep.Holla@arm.com>,
<linuxarm@huawei.com>, <jonathan.cameron@huawei.com>,
<zhanjie9@hisilicon.com>, <zhenglifeng1@huawei.com>,
<yubowen8@huawei.com>, <lihuisong@huawei.com>
Subject: Re: [PATCH 1/3] ACPI: processor: idle: Relocate and verify acpi_processor_ffh_lpi_probe
Date: Thu, 15 Jan 2026 20:09:02 +0800 [thread overview]
Message-ID: <2b1a456f-b9e3-4722-84ba-ba4fdd4b2ece@huawei.com> (raw)
In-Reply-To: <CAJZ5v0j9Mp5AqQwpakVLWDmK10cjOOiKtetfCr2OSSukekdPhQ@mail.gmail.com>
Hi Rafael,
On 1/15/2026 1:27 AM, Rafael J. Wysocki wrote:
> On Tue, Nov 25, 2025 at 7:52 AM Huisong Li <lihuisong@huawei.com> wrote:
>> The platform used LPI need check if the LPI support and the entry
>> method is valid by the acpi_processor_ffh_lpi_probe(). But the return
>> of acpi_processor_ffh_lpi_probe() in acpi_processor_setup_cpuidle_dev()
>> isn't verified by any caller.
>>
>> What's more, acpi_processor_get_power_info() is a more logical place for
>> verifying the validity of FFH LPI than acpi_processor_setup_cpuidle_dev().
>> So move acpi_processor_ffh_lpi_probe() from the latter to the former and
>> verify its return.
>>
>> Signed-off-by: Huisong Li <lihuisong@huawei.com>
>> ---
>> drivers/acpi/processor_idle.c | 10 ++++++++--
>> 1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
>> index 5f86297c8b23..cdf86874a87a 100644
>> --- a/drivers/acpi/processor_idle.c
>> +++ b/drivers/acpi/processor_idle.c
>> @@ -1252,7 +1252,7 @@ static int acpi_processor_setup_cpuidle_dev(struct acpi_processor *pr,
>>
>> dev->cpu = pr->id;
>> if (pr->flags.has_lpi)
>> - return acpi_processor_ffh_lpi_probe(pr->id);
>> + return 0;
>>
>> acpi_processor_setup_cpuidle_cx(pr, dev);
>> return 0;
>> @@ -1264,7 +1264,13 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr)
>>
>> ret = acpi_processor_get_lpi_info(pr);
>> if (ret)
>> - ret = acpi_processor_get_cstate_info(pr);
>> + return acpi_processor_get_cstate_info(pr);
>> +
>> + if (pr->flags.has_lpi) {
>> + ret = acpi_processor_ffh_lpi_probe(pr->id);
>> + if (ret)
>> + pr_err("Processor FFH LPI state is invalid.\n");
>> + }
>>
>> return ret;
>> }
>> --
> Please reorder this behind the next patch in the series.
Patch 2/3 depends on this patch.
So I don't know how to reorder this patch.
>
next prev parent reply other threads:[~2026-01-15 12:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-25 6:52 [PATCH 0/3] ACPI: processor: idle: Enhance LPI verification and Huisong Li
2025-11-25 6:52 ` [PATCH 1/3] ACPI: processor: idle: Relocate and verify acpi_processor_ffh_lpi_probe Huisong Li
2026-01-14 17:27 ` Rafael J. Wysocki
2026-01-15 12:09 ` lihuisong (C) [this message]
2026-01-15 13:06 ` Rafael J. Wysocki
2026-01-16 6:37 ` lihuisong (C)
2026-01-16 12:22 ` Rafael J. Wysocki
2025-11-25 6:52 ` [PATCH 2/3] ACPI: processor: idle: Redefine acpi_processor_setup_cpuidle_dev to void Huisong Li
2025-11-25 6:52 ` [PATCH 3/3] ACPI: processor: idle: Redefine acpi_processor_setup_cpuidle_states " Huisong Li
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2b1a456f-b9e3-4722-84ba-ba4fdd4b2ece@huawei.com \
--to=lihuisong@huawei.com \
--cc=Sudeep.Holla@arm.com \
--cc=jonathan.cameron@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@huawei.com \
--cc=rafael@kernel.org \
--cc=yubowen8@huawei.com \
--cc=zhanjie9@hisilicon.com \
--cc=zhenglifeng1@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®