[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 2/2] cpufreq: fix turbo mode state reporting



Currently we report back 0 or 1, which is broken since xenpm expects
CPUFREQ_TURBO_DISABLED, CPUFREQ_TURBO_UNSUPPORTED, or
CPUFREQ_TURBO_ENABLED. Report back actual policy->turbo value instead.
---
 xen/drivers/cpufreq/utility.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/xen/drivers/cpufreq/utility.c b/xen/drivers/cpufreq/utility.c
index 3dd70e2..1ff5e29 100644
--- a/xen/drivers/cpufreq/utility.c
+++ b/xen/drivers/cpufreq/utility.c
@@ -428,7 +428,10 @@ int cpufreq_get_turbo_status(int cpuid)
     struct cpufreq_policy *policy;
 
     policy = per_cpu(cpufreq_cpu_policy, cpuid);
-    return policy && policy->turbo;
+    if (!policy)
+        return CPUFREQ_TURBO_UNSUPPORTED;
+
+    return policy->turbo;
 }
 
 /*********************************************************************
-- 
1.7.9.5



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.