linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: arjan@linux.intel.com
To: linux-pm@vger.kernel.org
Cc: rafael@kernel.org, Arjan van de Ven <arjan@linux.intel.com>
Subject: [PATCH 2/4] intel_idle: move one more model specific workaround into the newly created seperate function
Date: Mon, 17 Jul 2023 15:18:54 +0000	[thread overview]
Message-ID: <20230717151856.2529029-2-arjan@linux.intel.com> (raw)
In-Reply-To: <20230717151856.2529029-1-arjan@linux.intel.com>

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 --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);
-	}
 }
 
 /**
-- 
2.41.0


  reply	other threads:[~2023-07-17 15:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-17 15:18 [PATCH 1/4] intel_idle: refactor and split out model specific fixups into its own function arjan
2023-07-17 15:18 ` arjan [this message]
2023-07-17 15:18 ` [PATCH 3/4] intel_idle: add VM guest (non)handling to model_specific_fixups arjan
2023-07-17 15:18 ` [PATCH 4/4] intel_idle: remove intel_idle_hlt_irq_on arjan
2023-07-19 18:28 ` [PATCH 1/4] intel_idle: refactor and split out model specific fixups into its own function Rafael J. Wysocki

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230717151856.2529029-2-arjan@linux.intel.com \
    --to=arjan@linux.intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=rafael@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).