Commit bf1d33df authored by Rafael J. Wysocki's avatar Rafael J. Wysocki
Browse files

ACPI: processor_idle: Use acpi_idle_play_dead() for all C-states



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.

Suggested-by: default avatarPeter Zijlstra <peterz@infradead.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Tested-by: Mario Limonciello <mario.limonciello@amd.com> # 6.12-rc7
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Link: https://patch.msgid.link/2373563.ElGaqSPkdT@rjwysocki.net
parent 4e9ad033
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -803,12 +803,12 @@ static int acpi_processor_setup_cstates(struct acpi_processor *pr)
		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)

		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