diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2011-04-28 01:07:23 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-05-04 01:22:59 -0400 |
commit | 104699c0ab473535793b5fea156adaf309afd29b (patch) | |
tree | 6fb55df112b7beb3af4840378b5b3bb55565659b /arch/powerpc/platforms/cell/smp.c | |
parent | 48404f2e95ef0ffd8134d89c8abcd1a15e15f1b0 (diff) |
powerpc: Convert old cpumask API into new one
Adapt new API.
Almost change is trivial. Most important change is the below line
because we plan to change task->cpus_allowed implementation.
- ctx->cpus_allowed = current->cpus_allowed;
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/smp.c')
-rw-r--r-- | arch/powerpc/platforms/cell/smp.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/arch/powerpc/platforms/cell/smp.c b/arch/powerpc/platforms/cell/smp.c index 03d638e2f44f..a2161b91b0bf 100644 --- a/arch/powerpc/platforms/cell/smp.c +++ b/arch/powerpc/platforms/cell/smp.c | |||
@@ -77,7 +77,7 @@ static inline int __devinit smp_startup_cpu(unsigned int lcpu) | |||
77 | unsigned int pcpu; | 77 | unsigned int pcpu; |
78 | int start_cpu; | 78 | int start_cpu; |
79 | 79 | ||
80 | if (cpu_isset(lcpu, of_spin_map)) | 80 | if (cpumask_test_cpu(lcpu, &of_spin_map)) |
81 | /* Already started by OF and sitting in spin loop */ | 81 | /* Already started by OF and sitting in spin loop */ |
82 | return 1; | 82 | return 1; |
83 | 83 | ||
@@ -123,7 +123,7 @@ static int __init smp_iic_probe(void) | |||
123 | { | 123 | { |
124 | iic_request_IPIs(); | 124 | iic_request_IPIs(); |
125 | 125 | ||
126 | return cpus_weight(cpu_possible_map); | 126 | return cpumask_weight(cpu_possible_mask); |
127 | } | 127 | } |
128 | 128 | ||
129 | static void __devinit smp_cell_setup_cpu(int cpu) | 129 | static void __devinit smp_cell_setup_cpu(int cpu) |
@@ -188,13 +188,12 @@ void __init smp_init_cell(void) | |||
188 | if (cpu_has_feature(CPU_FTR_SMT)) { | 188 | if (cpu_has_feature(CPU_FTR_SMT)) { |
189 | for_each_present_cpu(i) { | 189 | for_each_present_cpu(i) { |
190 | if (cpu_thread_in_core(i) == 0) | 190 | if (cpu_thread_in_core(i) == 0) |
191 | cpu_set(i, of_spin_map); | 191 | cpumask_set_cpu(i, &of_spin_map); |
192 | } | 192 | } |
193 | } else { | 193 | } else |
194 | of_spin_map = cpu_present_map; | 194 | cpumask_copy(&of_spin_map, cpu_present_mask); |
195 | } | ||
196 | 195 | ||
197 | cpu_clear(boot_cpuid, of_spin_map); | 196 | cpumask_clear_cpu(boot_cpuid, &of_spin_map); |
198 | 197 | ||
199 | /* Non-lpar has additional take/give timebase */ | 198 | /* Non-lpar has additional take/give timebase */ |
200 | if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) { | 199 | if (rtas_token("freeze-time-base") != RTAS_UNKNOWN_SERVICE) { |