From: dirk.brandewie@gmail.com
To: linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org
Cc: konrad.wilk@oracle.com, jwboyer@redhat.com,
Dirk Brandewie <dirk.brandewie@gmail.com>,
Dirk Brandewie <dirk.j.brandewie@intel.com>
Subject: [PATCH 1/2] cpufreq/intel_pstate: Do not load on VM that do not report max P state.
Date: Tue, 5 Mar 2013 14:15:26 -0800 [thread overview]
Message-ID: <1362521727-20666-2-git-send-email-dirk.brandewie@gmail.com> (raw)
In-Reply-To: <1362521727-20666-1-git-send-email-dirk.brandewie@gmail.com>
From: Dirk Brandewie <dirk.brandewie@gmail.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@redhat.com
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.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
next prev parent reply other threads:[~2013-03-05 22:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-05 22:15 [PATCH 0/2] v3.9-rc1 fixes for intel_pstate driver dirk.brandewie
2013-03-05 22:15 ` dirk.brandewie [this message]
2013-03-05 22:15 ` [PATCH 2/2] cpufreq/intel_pstate: Fix intel_pstate_init() error path dirk.brandewie
2013-03-06 13:37 ` Viresh Kumar
2013-03-06 13:37 ` [PATCH 0/2] v3.9-rc1 fixes for intel_pstate driver Viresh Kumar
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=1362521727-20666-2-git-send-email-dirk.brandewie@gmail.com \
--to=dirk.brandewie@gmail.com \
--cc=cpufreq@vger.kernel.org \
--cc=dirk.j.brandewie@intel.com \
--cc=jwboyer@redhat.com \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@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®