]> git.hungrycats.org Git - linux/commit
ACPI: processor: idle: Move max_cstate update out of the loop
authorHuisong Li <lihuisong@huawei.com>
Wed, 11 Mar 2026 06:50:37 +0000 (14:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Sep 2026 11:36:19 +0000 (13:36 +0200)
commite1cfb85ab258ce05df6ebdf466d597de2f636e4e
tree21b0fed5619305c15603b744b120722ffa8c5a77
parentfcc577939931aa5a25266df80bc19cd033c33142
ACPI: processor: idle: Move max_cstate update out of the loop

[ Upstream commit 1f23194c8b8208bf3a43beb6c97d4c843197b6f6 ]

The acpi_processor_cstate_first_run_checks() function, which updates
max_cstate on certain platforms, only needs to be executed once.

Move this call outside of the loop to avoid redundant executions.

Signed-off-by: Huisong Li <lihuisong@huawei.com>
Link: https://patch.msgid.link/20260311065038.4151558-3-lihuisong@huawei.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Stable-dep-of: 66c62e6773c5 ("ACPI: processor: Add cpuidle driver check in acpi_processor_register_idle_driver()")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/acpi/processor_idle.c