aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/acpi
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-10-21 09:21:09 +0200
committerJan Beulich <jbeulich@suse.com>2011-10-21 09:21:09 +0200
commit4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d (patch)
tree495538ea99a0b2c90eb6f18c87fd48fab2f4ec3e /xen/arch/x86/acpi
parent3cfbbfcf4cb1d4fecfd1c9a8bab090bdb61e993e (diff)
downloadxen-4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d.tar.gz
xen-4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d.tar.bz2
xen-4f3e36d7ad7cd23f8df44e39fb14313a8a809e3d.zip
eliminate direct assignments of CPU masks
Use cpumask_copy() instead of direct variable assignments for copying CPU masks. While direct assignments are not a problem when both sides are variables actually defined as cpumask_t (except for possibly copying *much* more than would actually need to be copied), they must not happen when the original variable is of type cpumask_var_t (which may have lass space allocated to it than a full cpumask_t). Eliminate as many of such assignments as possible (in several cases it's even possible to collapse two operations [copy then clear one bit] into one [cpumask_andnot()]), and thus set the way for reducing the allocation size in alloc_cpumask_var(). Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/arch/x86/acpi')
-rw-r--r--xen/arch/x86/acpi/cpufreq/powernow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/acpi/cpufreq/powernow.c b/xen/arch/x86/acpi/cpufreq/powernow.c
index 715373fc03..846f9ca8e9 100644
--- a/xen/arch/x86/acpi/cpufreq/powernow.c
+++ b/xen/arch/x86/acpi/cpufreq/powernow.c
@@ -107,7 +107,7 @@ static int powernow_cpufreq_target(struct cpufreq_policy *policy,
if (unlikely(result))
return -ENODEV;
- online_policy_cpus = policy->cpus;
+ cpumask_and(&online_policy_cpus, &policy->cpus, &cpu_online_map);
next_perf_state = data->freq_table[next_state].index;
if (perf->state == next_perf_state) {