Skip to content

Commit 1f23194

Browse files
LiHuiSong1rafaeljw
authored andcommitted
ACPI: processor: idle: Move max_cstate update out of the loop
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>
1 parent db19103 commit 1f23194

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/acpi/processor_idle.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1359,6 +1359,8 @@ void acpi_processor_register_idle_driver(void)
13591359
int ret = -ENODEV;
13601360
int cpu;
13611361

1362+
acpi_processor_cstate_first_run_checks();
1363+
13621364
/*
13631365
* ACPI idle driver is used by all possible CPUs.
13641366
* Use the processor power info of one in them to set up idle states.
@@ -1370,7 +1372,6 @@ void acpi_processor_register_idle_driver(void)
13701372
if (!pr)
13711373
continue;
13721374

1373-
acpi_processor_cstate_first_run_checks();
13741375
ret = acpi_processor_get_power_info(pr);
13751376
if (!ret) {
13761377
pr->flags.power_setup_done = 1;

0 commit comments

Comments
 (0)