aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Vrabel <david.vrabel@citrix.com>2012-08-09 16:44:51 +0100
committerDavid Vrabel <david.vrabel@citrix.com>2012-08-09 16:44:51 +0100
commit2bb43a3405605e7f5fdb408e118050ff7f00a8b5 (patch)
tree12f099dda44a953e5f1fc1494da2083790c10551
parente0b12805c5a63ba4980c006a72514f289f293bc5 (diff)
downloadxen-2bb43a3405605e7f5fdb408e118050ff7f00a8b5.tar.gz
xen-2bb43a3405605e7f5fdb408e118050ff7f00a8b5.tar.bz2
xen-2bb43a3405605e7f5fdb408e118050ff7f00a8b5.zip
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@citrix.com> Committed-by: Jan Beulich <jbeulich@suse.com> xen-unstable changeset: 25706:7fd5facb6084 xen-unstable date: Fri Aug 03 09:50:28 2012 +0200
-rw-r--r--xen/drivers/acpi/pmstat.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/xen/drivers/acpi/pmstat.c b/xen/drivers/acpi/pmstat.c
index 2387065c7b..1c6c238393 100644
--- a/xen/drivers/acpi/pmstat.c
+++ b/xen/drivers/acpi/pmstat.c
@@ -68,6 +68,8 @@ int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
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;