diff options
author | Jan Beulich <jbeulich@suse.com> | 2011-11-07 10:29:14 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2011-11-07 10:29:14 +0100 |
commit | 4e3d89fbfa6e14e3ddce14b4da84adcb6f7ce0ea (patch) | |
tree | fab16a84ec2df628c1fd9b9ea613d55869a16fc6 /xen/arch/x86/acpi | |
parent | 7b3b6e264807698febcd202921ee68764243a93a (diff) | |
download | xen-4e3d89fbfa6e14e3ddce14b4da84adcb6f7ce0ea.tar.gz xen-4e3d89fbfa6e14e3ddce14b4da84adcb6f7ce0ea.tar.bz2 xen-4e3d89fbfa6e14e3ddce14b4da84adcb6f7ce0ea.zip |
cpufreq: allocate CPU masks dynamically
struct cpufreq_policy, including a cpumask_t member, gets copied in
cpufreq_limit_change(), cpufreq_add_cpu(), set_cpufreq_gov(), and
set_cpufreq_para(). Make the member a cpumask_var_t, thus reducing the
amount of data needing copying (particularly with large NR_CPUS).
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/cpufreq.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/acpi/cpufreq/powernow.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/xen/arch/x86/acpi/cpufreq/cpufreq.c b/xen/arch/x86/acpi/cpufreq/cpufreq.c index f5be78b836..5fb7cfae9e 100644 --- a/xen/arch/x86/acpi/cpufreq/cpufreq.c +++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c @@ -446,7 +446,7 @@ static int acpi_cpufreq_target(struct cpufreq_policy *policy, if (unlikely(result)) return -ENODEV; - cpumask_and(&online_policy_cpus, &cpu_online_map, &policy->cpus); + cpumask_and(&online_policy_cpus, &cpu_online_map, policy->cpus); next_perf_state = data->freq_table[next_state].index; if (perf->state == next_perf_state) { diff --git a/xen/arch/x86/acpi/cpufreq/powernow.c b/xen/arch/x86/acpi/cpufreq/powernow.c index 4f94d3f726..743321aac8 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; - cpumask_and(&online_policy_cpus, &policy->cpus, &cpu_online_map); + 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) { @@ -202,15 +202,15 @@ static int powernow_cpufreq_cpu_init(struct cpufreq_policy *policy) if (policy->shared_type == CPUFREQ_SHARED_TYPE_ALL || policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) { - cpumask_set_cpu(cpu, &policy->cpus); - if (cpumask_weight(&policy->cpus) != 1) { + 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)); + policy->shared_type, cpumask_weight(policy->cpus)); result = -ENODEV; goto err_unreg; } } else { - cpumask_copy(&policy->cpus, cpumask_of(cpu)); + cpumask_copy(policy->cpus, cpumask_of(cpu)); } /* capability check */ |