diff mbox series

[2/4] intel_idle: move one more model specific workaround into the newly created seperate function

Message ID 20230717151856.2529029-2-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>

byt_auto_demotion_disable_flag (for baytrail) handling can now be moved into the newly created
model_specific_fixups() function.

This frees up intel_idle_init_cstates_icpu() from containing model specific information direclty

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

Patch

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 3bab6500697a..f3eba9b147d2 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -1981,6 +1981,11 @@  static void __init model_specific_fixups(void)
 		adl_idle_state_table_update();
 		break;
 	}
+
+	if (icpu->byt_auto_demotion_disable_flag) {
+		wrmsrl(MSR_CC6_DEMOTION_POLICY_CONFIG, 0);
+		wrmsrl(MSR_MC6_DEMOTION_POLICY_CONFIG, 0);
+	}
 }
 
 static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
@@ -2030,10 +2035,6 @@  static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv)
 		drv->state_count++;
 	}
 
-	if (icpu->byt_auto_demotion_disable_flag) {
-		wrmsrl(MSR_CC6_DEMOTION_POLICY_CONFIG, 0);
-		wrmsrl(MSR_MC6_DEMOTION_POLICY_CONFIG, 0);
-	}
 }
 
 /**