ACPI: processor_idle: Use acpi_idle_play_dead() for all C-states
PATCH 1/1 ACPI: processor_idle: Use acpi_idle_play_dead() for all C-states
From: Rafael J. Wysocki <[email protected]>
Notice that acpi_processor_setup_cstates() can set state->enter_dead to acpi_idle_play_dead() for all C-states unconditionally and remove the confusing C-state type check done before setting it.
No intentional functional impact.
--- drivers/acpi/processor_idle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/acpi/processor_idle.c +6 -6
@@ -803,12 +803,12 @@ static int acpi_processor_setup_cstates( state->enter = acpi_idle_enter; state->flags =0 ; -if (cx->type ==ACPI_STATE_C1 || cx->type ==ACPI_STATE_C2 || - cx->type ==ACPI_STATE_C3 ) { - state->enter_dead = acpi_idle_play_dead; -if (cx->type !=ACPI_STATE_C3 ) - drv->safe_state_index = count; - } + + state->enter_dead = acpi_idle_play_dead; + +if (cx->type ==ACPI_STATE_C1 || cx->type ==ACPI_STATE_C2 ) + drv->safe_state_index = count; +/* * Halt-induced C1 is not good for ->enter_s2idle, because it * re-enables interrupts on exit. Moreover, C1 is generally not
Quoted 9 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Notice that
acpi_processor_setup_cstates()can setstate->enter_deadtoacpi_idle_play_dead()for all C-states unconditionally and remove the confusing C-state type check done before setting it.No intentional functional impact.
Suggested-by Peter Zijlstra <[email protected]>Signed-off-by Rafael J. Wysocki <[email protected]>
Quoted 30 lines
--- drivers/acpi/processor_idle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Index:
linux-pm/drivers/acpi/processor_idle.c
===================================================================drivers/acpi/processor_idle.c +6
-6@@ -803,12 +803,12 @@ static int acpi_processor_setup_cstates( state->enter = acpi_idle_enter; state->flags =0 ; -if (cx->type ==ACPI_STATE_C1 || cx->type ==ACPI_STATE_C2 || - cx->type ==ACPI_STATE_C3 ) { - state->enter_dead = acpi_idle_play_dead; -if (cx->type !=ACPI_STATE_C3 ) - drv->safe_state_index = count; - } + + state->enter_dead = acpi_idle_play_dead; + +if (cx->type ==ACPI_STATE_C1 || cx->type ==ACPI_STATE_C2 ) + drv->safe_state_index = count; +/* * Halt-induced C1 is not good for ->enter_s2idle, because it * re-enables interrupts on exit. Moreover, C1 is generally not
Quoted 23 lines · Rafael J. Wysocki
From: Rafael J. Wysocki <[email protected]>
Notice that
acpi_processor_setup_cstates()can setstate->enter_deadtoacpi_idle_play_dead()for all C-states unconditionally and remove the confusing C-state type check done before setting it.No intentional functional impact.
Suggested-by Peter Zijlstra <[email protected]>Signed-off-by Rafael J. Wysocki <[email protected]>--- drivers/acpi/processor_idle.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Index:
linux-pm/drivers/acpi/processor_idle.c
===================================================================drivers/acpi/processor_idle.c +0
-2@@ -803,12 +803,12 @@ static int acpi_processor_setup_cstates( state->enter = acpi_idle_enter; state->flags =0 ; -if (cx->type ==ACPI_STATE_C1 || cx->type ==ACPI_STATE_C2 || - cx->type ==ACPI_STATE_C3 ) {
drivers/acpi/processor_idle.c static int acpi_processor_setup_cstates( · line 811
Quoted 10 lines
drivers/acpi/processor_idle.c +6
-4- state->enter_dead = acpi_idle_play_dead; -if (cx->type !=ACPI_STATE_C3 ) - drv->safe_state_index = count; - } + + state->enter_dead = acpi_idle_play_dead; + +if (cx->type ==ACPI_STATE_C1 || cx->type ==ACPI_STATE_C2 ) + drv->safe_state_index = count; +
Thanks!