diff mbox series

[4/4] intel_idle: remove intel_idle_hlt_irq_on

Message ID 20230717151856.2529029-4-arjan@linux.intel.com (mailing list archive)
State Superseded, archived
Headers show
Series [1/4] intel_idle: refactor and split out model specific fixups into its own function | expand

Commit Message

Arjan van de Ven July 17, 2023, 3:18 p.m. UTC
From: Arjan van de Ven <arjan@linux.intel.com>

PeterZ pointed out that the whole function is redundant as for hlt, it's always "irq on"

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
---
 drivers/idle/intel_idle.c | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)
diff mbox series

Patch

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 4dd8081d2406..038322c23e34 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -224,17 +224,6 @@  static __cpuidle int intel_idle_hlt(struct cpuidle_device *dev,
 	return __intel_idle_hlt(dev, drv, index);
 }
 
-static __cpuidle int intel_idle_hlt_irq_on(struct cpuidle_device *dev,
-                                   struct cpuidle_driver *drv, int index)
-{
-       int ret;
-
-       raw_local_irq_enable();
-       ret = __intel_idle_hlt(dev, drv, index);
-       raw_local_irq_disable();
-
-       return ret;
-}
 
 /**
  * intel_idle_s2idle - Ask the processor to enter the given idle state.
@@ -1897,15 +1886,8 @@  static bool __init intel_idle_verify_cstate(unsigned int mwait_hint)
 
 static void state_update_enter_method(struct cpuidle_state *state, int cstate)
 {
-	if (state->enter == intel_idle_hlt) {
-		if (force_irq_on) {
-			pr_info("forced intel_idle_irq for state %d\n", cstate);
-			state->enter = intel_idle_hlt_irq_on;
-		}
+	if (state->enter == intel_idle_hlt)
 		return;
-	}
-	if (state->enter == intel_idle_hlt_irq_on)
-		return; /* no update scenarios */
 
 	if (state->flags & CPUIDLE_FLAG_INIT_XSTATE) {
 		/*
@@ -1949,8 +1931,6 @@  static bool should_verify_mwait(struct cpuidle_state *state)
 {
 	if (state->enter == intel_idle_hlt)
 		return false;
-	if (state->enter == intel_idle_hlt_irq_on)
-		return false;
 
 	return true;
 }