diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2009-01-04 08:18:06 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-01-06 03:05:31 -0500 |
commit | 835481d9bcd65720b473db6b38746a74a3964218 (patch) | |
tree | a6f0fa205542cf73a980a2f8e41d5e908a33b6d6 /arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |
parent | 5cb0535f1713b51610f2881b17d0fe3656114364 (diff) |
cpumask: convert struct cpufreq_policy to cpumask_var_t
Impact: use new cpumask API to reduce memory usage
This is part of an effort to reduce structure sizes for machines
configured with large NR_CPUS. cpumask_t gets replaced by
cpumask_var_t, which is either struct cpumask[1] (small NR_CPUS) or
struct cpumask * (large NR_CPUS).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Mike Travis <travis@sgi.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c')
-rw-r--r-- | arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c index d2cc4991cbaa..f08998278a3a 100644 --- a/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c +++ b/arch/x86/kernel/cpu/cpufreq/speedstep-centrino.c | |||
@@ -492,8 +492,8 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
492 | } | 492 | } |
493 | 493 | ||
494 | first_cpu = 1; | 494 | first_cpu = 1; |
495 | for_each_cpu_mask_nr(j, policy->cpus) { | 495 | for_each_cpu(j, policy->cpus) { |
496 | const cpumask_t *mask; | 496 | const struct cpumask *mask; |
497 | 497 | ||
498 | /* cpufreq holds the hotplug lock, so we are safe here */ | 498 | /* cpufreq holds the hotplug lock, so we are safe here */ |
499 | if (!cpu_online(j)) | 499 | if (!cpu_online(j)) |
@@ -504,9 +504,9 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
504 | * Make sure we are running on CPU that wants to change freq | 504 | * Make sure we are running on CPU that wants to change freq |
505 | */ | 505 | */ |
506 | if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) | 506 | if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY) |
507 | mask = &policy->cpus; | 507 | mask = policy->cpus; |
508 | else | 508 | else |
509 | mask = &cpumask_of_cpu(j); | 509 | mask = cpumask_of(j); |
510 | 510 | ||
511 | set_cpus_allowed_ptr(current, mask); | 511 | set_cpus_allowed_ptr(current, mask); |
512 | preempt_disable(); | 512 | preempt_disable(); |
@@ -538,7 +538,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
538 | dprintk("target=%dkHz old=%d new=%d msr=%04x\n", | 538 | dprintk("target=%dkHz old=%d new=%d msr=%04x\n", |
539 | target_freq, freqs.old, freqs.new, msr); | 539 | target_freq, freqs.old, freqs.new, msr); |
540 | 540 | ||
541 | for_each_cpu_mask_nr(k, policy->cpus) { | 541 | for_each_cpu(k, policy->cpus) { |
542 | if (!cpu_online(k)) | 542 | if (!cpu_online(k)) |
543 | continue; | 543 | continue; |
544 | freqs.cpu = k; | 544 | freqs.cpu = k; |
@@ -563,7 +563,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
563 | preempt_enable(); | 563 | preempt_enable(); |
564 | } | 564 | } |
565 | 565 | ||
566 | for_each_cpu_mask_nr(k, policy->cpus) { | 566 | for_each_cpu(k, policy->cpus) { |
567 | if (!cpu_online(k)) | 567 | if (!cpu_online(k)) |
568 | continue; | 568 | continue; |
569 | freqs.cpu = k; | 569 | freqs.cpu = k; |
@@ -586,7 +586,7 @@ static int centrino_target (struct cpufreq_policy *policy, | |||
586 | tmp = freqs.new; | 586 | tmp = freqs.new; |
587 | freqs.new = freqs.old; | 587 | freqs.new = freqs.old; |
588 | freqs.old = tmp; | 588 | freqs.old = tmp; |
589 | for_each_cpu_mask_nr(j, policy->cpus) { | 589 | for_each_cpu(j, policy->cpus) { |
590 | if (!cpu_online(j)) | 590 | if (!cpu_online(j)) |
591 | continue; | 591 | continue; |
592 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); | 592 | cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE); |