[PATCH 1/1][SRU][oem-5.14/impish/jammy] ACPI: processor idle: Allow playing dead in C3 state

You-Sheng Yang vicamo.yang at canonical.com
Wed Dec 15 16:40:17 UTC 2021


From: Richard Gong <richard.gong at amd.com>

BugLink: https://bugs.launchpad.net/bugs/1954930

When some cores are disabled on AMD platforms, the system will no longer
be able to enter suspend-to-idle s0ix.

Update to allow playing dead in C3 state so that the CPUs can enter the
deepest state on AMD platforms.

BugLink: https://gitlab.freedesktop.org/drm/amd/-/issues/1708
Suggested-by: Mario Limonciello <mario.limonciello at amd.com>
Signed-off-by: Richard Gong <richard.gong at amd.com>
[ rjw: Fixed coding style ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki at intel.com>
(cherry picked from commit d6b88ce2eb9d2698eb24451eb92c0a1649b17bb1)
Signed-off-by: You-Sheng Yang <vicamo.yang at canonical.com>
---
 drivers/acpi/processor_idle.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 095c8aca141e..ef5ee2f13aeb 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -789,7 +789,8 @@ 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) {
+		if (cx->type == ACPI_STATE_C1 || cx->type == ACPI_STATE_C2 ||
+		    cx->type == ACPI_STATE_C3) {
 			state->enter_dead = acpi_idle_play_dead;
 			drv->safe_state_index = count;
 		}
-- 
2.32.0




More information about the kernel-team mailing list