[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241125132029.7241-4-patryk.wlazlyn@linux.intel.com>
Date: Mon, 25 Nov 2024 14:20:23 +0100
From: Patryk Wlazlyn <patryk.wlazlyn@...ux.intel.com>
To: x86@...nel.org
Cc: linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org,
rafael.j.wysocki@...el.com,
len.brown@...el.com,
artem.bityutskiy@...ux.intel.com,
dave.hansen@...ux.intel.com,
patryk.wlazlyn@...ux.intel.com,
peterz@...radead.org,
tglx@...utronix.de,
gautham.shenoy@....com
Subject: [RFC PATCH v4 3/8] ACPI: processor_idle: Use acpi_idle_play_dead() for all C-states
From: "Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
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: Peter Zijlstra <peterz@...radead.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
Reviewed-by: Mario Limonciello <mario.limonciello@....com>
Tested-by: Mario Limonciello <mario.limonciello@....com> # 6.12-rc7
Acked-by: Peter Zijlstra (Intel) <peterz@...radead.org>
---
drivers/acpi/processor_idle.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index ce728cf7e301..698897b29de2 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -800,12 +800,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)
- 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
--
2.47.0
Powered by blists - more mailing lists