[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1362521727-20666-2-git-send-email-dirk.brandewie@gmail.com>
Date: Tue, 5 Mar 2013 14:15:26 -0800
From: dirk.brandewie@...il.com
To: linux-kernel@...r.kernel.org, cpufreq@...r.kernel.org
Cc: konrad.wilk@...cle.com, jwboyer@...hat.com,
Dirk Brandewie <dirk.brandewie@...il.com>,
Dirk Brandewie <dirk.j.brandewie@...el.com>
Subject: [PATCH 1/2] cpufreq/intel_pstate: Do not load on VM that do not report max P state.
From: Dirk Brandewie <dirk.brandewie@...il.com>
It seems some VMs support the P state MSRs but return zeros. Fail
gracefully if we are running in this environment.
https://bugzilla.redhat.com/show_bug.cgi?id=916833
Reported-by: jwboyer@...hat.com
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@...el.com>
---
drivers/cpufreq/intel_pstate.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 096fde0..2bfd083 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -662,6 +662,9 @@ static int intel_pstate_set_policy(struct cpufreq_policy *policy)
cpu = all_cpu_data[policy->cpu];
+ if (!policy->cpuinfo.max_freq)
+ return -ENODEV;
+
intel_pstate_get_min_max(cpu, &min, &max);
limits.min_perf_pct = (policy->min * 100) / policy->cpuinfo.max_freq;
--
1.7.7.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists