Skip to content

Commit fc45e55

Browse files
vsyrjalarafaeljw
authored andcommitted
ACPI: processor: idle: Avoid falling back to C3 type C-states
The "safe state" index is used by acpi_idle_enter_bm() to avoid entering a C-state that may require bus mastering to be disabled on entry in the cases when this is not going to happen. For this reason, it should not be set to point to C3 type of C-states, because they may require bus mastering to be disabled on entry in principle. This was broken by commit d6b88ce ("ACPI: processor idle: Allow playing dead in C3 state") which inadvertently allowed the "safe state" index to point to C3 type of C-states. This results in a machine that won't boot past the point when it first enters C3. Restore the correct behaviour (either demote to C1/C2, or use C3 but also set ARB_DIS=1). I hit this on a Fujitsu Siemens Lifebook S6010 (P3) machine. Fixes: d6b88ce ("ACPI: processor idle: Allow playing dead in C3 state") Cc: 5.16+ <[email protected]> # 5.16+ Signed-off-by: Ville Syrjälä <[email protected]> Tested-by: Woody Suwalski <[email protected]> [ rjw: Subject and changelog adjustments ] Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent b2d229d commit fc45e55

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/acpi/processor_idle.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,8 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr)
795795
if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 ||
796796
cx->type == ACPI_STATE_C3) {
797797
state->enter_dead = acpi_idle_play_dead;
798-
drv->safe_state_index = count;
798+
if (cx->type != ACPI_STATE_C3)
799+
drv->safe_state_index = count;
799800
}
800801
/*
801802
* Halt-induced C1 is not good for ->enter_s2idle, because it

0 commit comments

Comments
 (0)