xcp-1.6-updates/xen-4.1.hg

changeset 23333:985fb467d180

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
author David Vrabel <david.vrabel@citrix.com>
date Thu Aug 09 16:44:51 2012 +0100 (2012-08-09)
parents 859205b36fe9
children ce7195d2b80e
files xen/drivers/acpi/pmstat.c
line diff
     1.1 --- a/xen/drivers/acpi/pmstat.c	Thu Aug 09 15:47:42 2012 +0100
     1.2 +++ b/xen/drivers/acpi/pmstat.c	Thu Aug 09 16:44:51 2012 +0100
     1.3 @@ -68,6 +68,8 @@ int do_get_pm_info(struct xen_sysctl_get
     1.4      case PMSTAT_PX:
     1.5          if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) )
     1.6              return -ENODEV;
     1.7 +        if ( !cpufreq_driver )
     1.8 +            return -ENODEV;
     1.9          if ( !pmpt || !(pmpt->perf.init & XEN_PX_INIT) )
    1.10              return -EINVAL;
    1.11          break;