From: "lihuisong (C)" <lihuisong@huawei.com>
To: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>, <rafael@kernel.org>,
<lenb@kernel.org>, <linux-acpi@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Cc: <CobeChen@zhaoxin.com>, <LindaChai@zhaoxin.com>, <lihuisong@huawei.com>
Subject: Re: [PATCH] ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver
Date: Thu, 28 May 2026 17:35:39 +0800 [thread overview]
Message-ID: <a5f2a5af-631a-4525-b03e-041d6b748f35@huawei.com> (raw)
In-Reply-To: <20260519091922.42500-1-TonyWWang-oc@zhaoxin.com>
Hello Tony,
Thank you for reporting this issue. Good point.
This patch is messy and not good to review and merge. please resend it.
In addition, suggest you add a fixed tag.
/Huisong
On 5/19/2026 5:19 PM, Tony W Wang-oc wrote:
> Commit 7a8c994cbb2d ("ACPI: processor: idle: Optimize ACPI idledriver registration") moved the ACPI idle driver registration toacpi_processor_driver_init(), but it didn't check whether a cpuidledriver was already registered.For example, on Intel platforms, if the intel_idle driver is alreadyloaded, the code would still evaluate the _CST object in the ACPItable and attempt to register the acpi_idle driver. This registrationwould fail with -EBUSY due to the existing check in cpuidle_register_driver.Add a check at the beginning of acpi_processor_register_idle_driver()to avoid unnecessary _CST evaluate and potential registration failures.--- drivers/acpi/processor_idle.c | 5 +++++ 1 file changed, 5 insertions(+)diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.cindex ee5facccbe10..0409411abb83 100644--- a/drivers/acpi/processor_idle.c+++ b/drivers/acpi/processor_idle.c@@ -1355,6 +1355,11 @@ void acpi_processor_register_idle_driver(void) int ret = -ENODEV; int cpu; + if (cpuidle_get_driver()) {+ pr_debug("cpuidle driver %pS already registered.\n", cpuidle_get_driver());+ return;+ }+ acpi_processor_update_max_cstate(); /*-- 2.25.1
>
>
>
>
> 保密声明
> 本邮件含有保密或专有信息,仅供指定收件人使用。严禁对本邮件或其内容做任何未经授权的查阅、使用、复制或转发。
>
> This email contains confidential or legally privileged information and is for the sole use of its intended recipient. Any unauthorized review, use, copying or forwarding of this email or the content of this email is strictly prohibited.
next prev parent reply other threads:[~2026-05-28 9:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 9:19 Tony W Wang-oc
2026-05-28 9:35 ` lihuisong (C) [this message]
2026-06-08 6:38 Tony W Wang-oc
2026-06-08 10:06 ` lihuisong (C)
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=a5f2a5af-631a-4525-b03e-041d6b748f35@huawei.com \
--to=lihuisong@huawei.com \
--cc=CobeChen@zhaoxin.com \
--cc=LindaChai@zhaoxin.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
/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®