Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1208195
| From | Len Brown <lenb@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 6/7] intel_idle: allow idle states to be freeze-mode specific |
| Date | 2015-08-16 05:40 +0200 |
| Message-ID | <pXWXD-4SO-9@gated-at.bofh.it> (permalink) |
| References | <pXWNX-4HK-5@gated-at.bofh.it> |
| Organization | Intel Open Source Technology Center |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
intel_idle, turbostat patches queued for upstream Len Brown <lenb@kernel.org> - 2015-08-16 05:40 +0200 [PATCH 7/7] intel_idle: Skylake Client Support Len Brown <lenb@kernel.org> - 2015-08-16 05:40 +0200 [PATCH 4/7] tools/power turbostat: fix parameter passing for forked command Len Brown <lenb@kernel.org> - 2015-08-16 05:40 +0200 [PATCH 3/7] tools/power turbostat: dump CONFIG_TDP Len Brown <lenb@kernel.org> - 2015-08-16 05:40 +0200 [PATCH 6/7] intel_idle: allow idle states to be freeze-mode specific Len Brown <lenb@kernel.org> - 2015-08-16 05:40 +0200 [PATCH 5/7] tools/power turbostat: fix typo on DRAM column in Joules-mode Len Brown <lenb@kernel.org> - 2015-08-16 05:40 +0200 [PATCH 2/7] tools/power turbostat: cpu0 is no longer hard-coded, so update output Len Brown <lenb@kernel.org> - 2015-08-16 05:40 +0200
csiph-web