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

[Xen-changelog] [xen-4.0-testing] cpufreq: P state stats aren't available if there is no cpufreq driver


  • To: xen-changelog@xxxxxxxxxxxxxxxxxxx
  • From: Xen patchbot-4.0-testing <patchbot@xxxxxxx>
  • Date: Fri, 10 Aug 2012 12:11:08 +0000
  • Delivery-date: Fri, 10 Aug 2012 12:11:23 +0000
  • List-id: "Change log for Mercurial \(receive only\)" <xen-changelog.lists.xen.org>

# HG changeset patch
# User David Vrabel <david.vrabel@xxxxxxxxxx>
# Date 1344527112 -3600
# Node ID 2bd0027ba0d11e14699f95cee47c147fdfb9a86f
# Parent  a51c86b407d732dd66343dea7a6249d2649740c6
cpufreq: P state stats aren't available if there is no cpufreq driver

If there is no cpufreq driver (e.g., with an AMD Opteron 8212) then
reading the P state statistics causes a deadlock as an uninitialized
spinlock is locked in do_get_pm_info(). The spinlock is initialized in
cpufreq_statistic_init() which is not called if cpufreq_driver ==
NULL.

Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx>
Committed-by: Jan Beulich <jbeulich@xxxxxxxx>
xen-unstable changeset:   25706:7fd5facb6084
xen-unstable date:        Fri Aug 03 09:50:28 2012 +0200
---


diff -r a51c86b407d7 -r 2bd0027ba0d1 xen/drivers/acpi/pmstat.c
--- a/xen/drivers/acpi/pmstat.c Thu Aug 09 15:47:19 2012 +0100
+++ b/xen/drivers/acpi/pmstat.c Thu Aug 09 16:45:12 2012 +0100
@@ -68,6 +68,8 @@ int do_get_pm_info(struct xen_sysctl_get
     case PMSTAT_PX:
         if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
             return -ENODEV;
+        if ( !cpufreq_driver )
+            return -ENODEV;
         if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
             return -EINVAL;
         break;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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