===================================================================
@@ -842,7 +842,7 @@ static int acpi_processor_setup_cpuidle_
static int acpi_processor_setup_cstates(struct acpi_processor *pr)
{
- int i, count = ACPI_IDLE_STATE_START;
+ int i, count;
struct acpi_processor_cx *cx;
struct cpuidle_state *state;
struct cpuidle_driver *drv = &acpi_idle_driver;
@@ -850,6 +850,13 @@ static int acpi_processor_setup_cstates(
if (max_cstate == 0)
max_cstate = 1;
+ if (IS_ENABLED(CONFIG_ARCH_HAS_CPU_RELAX)) {
+ cpuidle_poll_state_init(drv);
+ count = 1;
+ } else {
+ count = 0;
+ }
+
for (i = 1; i < ACPI_PROCESSOR_MAX_POWER && i <= max_cstate; i++) {
cx = &pr->power.states[i];
===================================================================
@@ -216,8 +216,6 @@ static int __cpuidle_register_driver(str
on_each_cpu_mask(drv->cpumask, cpuidle_setup_broadcast_timer,
(void *)1, 1);
- poll_idle_init(drv);
-
return 0;
}
===================================================================
@@ -21,7 +21,7 @@ static int __cpuidle poll_idle(struct cp
return index;
}
-void poll_idle_init(struct cpuidle_driver *drv)
+void cpuidle_poll_state_init(struct cpuidle_driver *drv)
{
struct cpuidle_state *state = &drv->states[0];
@@ -34,3 +34,4 @@ void poll_idle_init(struct cpuidle_drive
state->disabled = false;
state->flags = CPUIDLE_FLAG_POLLING;
}
+EXPORT_SYMBOL_GPL(cpuidle_poll_state_init);
===================================================================
@@ -226,9 +226,7 @@ static inline void cpuidle_coupled_paral
#endif
#ifdef CONFIG_ARCH_HAS_CPU_RELAX
-void poll_idle_init(struct cpuidle_driver *drv);
-#else
-static void poll_idle_init(struct cpuidle_driver *drv) {}
+void cpuidle_poll_state_init(struct cpuidle_driver *drv);
#endif
/******************************
===================================================================
@@ -1331,6 +1331,7 @@ static void __init intel_idle_cpuidle_dr
intel_idle_state_table_update();
+ cpuidle_poll_state_init(drv);
drv->state_count = 1;
for (cstate = 0; cstate < CPUIDLE_STATE_MAX; ++cstate) {