mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
cpuidle: Make drivers initialize polling state
Make the drivers that want to include the polling state into their states table initialize it explicitly and drop the initialization of it (which in fact is conditional, but that is not obvious from the code) from the core. Signed-off-by: Rafael J. Wysocki <[email protected]> Tested-by: Sudeep Holla <[email protected]> Acked-by: Daniel Lezcano <[email protected]>
This commit is contained in:
parent
34c2f65b71
commit
1b39e3f813
5 changed files with 13 additions and 6 deletions
|
|
@ -842,7 +842,7 @@ static int acpi_processor_setup_cpuidle_cx(struct acpi_processor *pr,
|
|||
|
||||
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(struct acpi_processor *pr)
|
|||
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];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue