mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Len Brown <len.brown@intel.com>
Subject: [PATCH 6/7] intel_idle: allow idle states to be freeze-mode specific
Date: Sat, 15 Aug 2015 23:25:47 -0400	[thread overview]
Message-ID: <7dd0e0af64afe4aa08ccdd167f64bd007f09b515.1439695194.git.len.brown@intel.com> (raw)
In-Reply-To: <1439695548-21174-1-git-send-email-lenb@kernel.org>
In-Reply-To: <75fd7ffa7fab91c2c3234bd3e465ba4f366733f4.1439695194.git.len.brown@intel.com>

From: Len Brown <len.brown@intel.com>

intel_idle uses a NULL "enter" field in a cpuidle state
to recognize the invalid entry terminating a variable-length array.

Linux-4.0 added support for the system-wide "freeze" state
in cpuidle drivers via the new "enter_freeze" field.

The natural way to expose a deep idle state for freeze,
but not for run-time idle is to supply "enter_freeze" without "enter";
so we update the driver to accept such states.

Signed-off-by: Len Brown <len.brown@intel.com>
---
 drivers/idle/intel_idle.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/idle/intel_idle.c b/drivers/idle/intel_idle.c
index 2a36a95..008e943 100644
--- a/drivers/idle/intel_idle.c
+++ b/drivers/idle/intel_idle.c
@@ -965,7 +965,8 @@ static int __init intel_idle_cpuidle_driver_init(void)
 	for (cstate = 0; cstate < CPUIDLE_STATE_MAX; ++cstate) {
 		int num_substates, mwait_hint, mwait_cstate;
 
-		if (cpuidle_state_table[cstate].enter == NULL)
+		if ((cpuidle_state_table[cstate].enter == NULL) &&
+		    (cpuidle_state_table[cstate].enter_freeze == NULL))
 			break;
 
 		if (cstate + 1 > max_cstate) {
-- 
2.5.0.330.g130be8e


  parent reply	other threads:[~2015-08-16  3:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-16  3:25 intel_idle, turbostat patches queued for upstream Len Brown
2015-08-16  3:25 ` [PATCH 1/7] tools/power turbostat: update turbostat(8) Len Brown
2015-08-16  3:25   ` [PATCH 2/7] tools/power turbostat: cpu0 is no longer hard-coded, so update output Len Brown
2015-08-16  3:25   ` [PATCH 3/7] tools/power turbostat: dump CONFIG_TDP Len Brown
2015-08-16  3:25   ` [PATCH 4/7] tools/power turbostat: fix parameter passing for forked command Len Brown
2015-08-16  3:25   ` [PATCH 5/7] tools/power turbostat: fix typo on DRAM column in Joules-mode Len Brown
2015-08-16  3:25   ` Len Brown [this message]
2015-08-16  3:25   ` [PATCH 7/7] intel_idle: Skylake Client Support Len Brown
2015-08-24 21:39 ` intel_idle, turbostat patches queued for upstream 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=7dd0e0af64afe4aa08ccdd167f64bd007f09b515.1439695194.git.len.brown@intel.com \
    --to=lenb@kernel.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.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

all inboxes | Powered by JetHome®