aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/acpi
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-11-07 10:26:23 +0100
committerJan Beulich <jbeulich@suse.com>2011-11-07 10:26:23 +0100
commit7b3b6e264807698febcd202921ee68764243a93a (patch)
tree3808ead491f1704cfd38064be1b34b71c375f058 /xen/arch/x86/acpi
parent31b39b17c8cc6cbd7936f72a4c250db370c5743e (diff)
downloadxen-7b3b6e264807698febcd202921ee68764243a93a.tar.gz
xen-7b3b6e264807698febcd202921ee68764243a93a.tar.bz2
xen-7b3b6e264807698febcd202921ee68764243a93a.zip
powernow: don't read never initialized structure member
c/s 20361:51b031b0737e removed the writing of struct processor_performance's shared_cpu_map member, but the powernow driver still has code to read it (though presumably that code path can't be taken on actual hardware supported by the powernow driver). Remove the use of the field along with the field itself. Signed-off-by: Jan Beulich <jbeulich@suse.com>
Diffstat (limited to 'xen/arch/x86/acpi')
-rw-r--r--xen/arch/x86/acpi/cpufreq/powernow.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/xen/arch/x86/acpi/cpufreq/powernow.c b/xen/arch/x86/acpi/cpufreq/powernow.c
index 846f9ca8e9..4f94d3f726 100644
--- a/xen/arch/x86/acpi/cpufreq/powernow.c
+++ b/xen/arch/x86/acpi/cpufreq/powernow.c
@@ -200,15 +200,17 @@ static int powernow_cpufreq_cpu_init(struct cpufreq_policy *policy)
perf = data->acpi_data;
policy->shared_type = perf->shared_type;
- /*
- * Will let policy->cpus know about dependency only when software
- * coordination is required.
- */
if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL ||
policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) {
- policy->cpus = perf->shared_cpu_map;
+ cpumask_set_cpu(cpu, &policy->cpus);
+ if (cpumask_weight(&policy->cpus) != 1) {
+ printk(XENLOG_WARNING "Unsupported sharing type %d (%u CPUs)\n",
+ policy->shared_type, cpumask_weight(&policy->cpus));
+ result = -ENODEV;
+ goto err_unreg;
+ }
} else {
- policy->cpus = cpumask_of_cpu(cpu);
+ cpumask_copy(&policy->cpus, cpumask_of(cpu));
}
/* capability check */