diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2012-03-29 01:08:30 -0400 |
---|---|---|
committer | Rusty Russell <rusty@rustcorp.com.au> | 2012-03-29 01:08:30 -0400 |
commit | 0b5f9c005def154f9c21f9be0223b65b50d54368 (patch) | |
tree | bbee9b3e549acc5886d1022c2aad46d5abfdd22e /arch/mips/kernel/smp.c | |
parent | b5174fa3a7f4f8f150bfa3b917c92608953dfa0f (diff) |
remove references to cpu_*_map in arch/
This has been obsolescent for a while; time for the final push.
In adjacent context, replaced old cpus_* with cpumask_*.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: David S. Miller <davem@davemloft.net> (arch/sparc)
Acked-by: Chris Metcalf <cmetcalf@tilera.com> (arch/tile)
Cc: user-mode-linux-devel@lists.sourceforge.net
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Cc: Richard Kuo <rkuo@codeaurora.org>
Cc: linux-hexagon@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Helge Deller <deller@gmx.de>
Cc: sparclinux@vger.kernel.org
Diffstat (limited to 'arch/mips/kernel/smp.c')
-rw-r--r-- | arch/mips/kernel/smp.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/arch/mips/kernel/smp.c b/arch/mips/kernel/smp.c index 9c1cce9de35f..ba9376bf52a1 100644 --- a/arch/mips/kernel/smp.c +++ b/arch/mips/kernel/smp.c | |||
@@ -148,7 +148,7 @@ static void stop_this_cpu(void *dummy) | |||
148 | /* | 148 | /* |
149 | * Remove this CPU: | 149 | * Remove this CPU: |
150 | */ | 150 | */ |
151 | cpu_clear(smp_processor_id(), cpu_online_map); | 151 | set_cpu_online(smp_processor_id(), false); |
152 | for (;;) { | 152 | for (;;) { |
153 | if (cpu_wait) | 153 | if (cpu_wait) |
154 | (*cpu_wait)(); /* Wait if available. */ | 154 | (*cpu_wait)(); /* Wait if available. */ |
@@ -174,7 +174,7 @@ void __init smp_prepare_cpus(unsigned int max_cpus) | |||
174 | mp_ops->prepare_cpus(max_cpus); | 174 | mp_ops->prepare_cpus(max_cpus); |
175 | set_cpu_sibling_map(0); | 175 | set_cpu_sibling_map(0); |
176 | #ifndef CONFIG_HOTPLUG_CPU | 176 | #ifndef CONFIG_HOTPLUG_CPU |
177 | init_cpu_present(&cpu_possible_map); | 177 | init_cpu_present(cpu_possible_mask); |
178 | #endif | 178 | #endif |
179 | } | 179 | } |
180 | 180 | ||
@@ -248,7 +248,7 @@ int __cpuinit __cpu_up(unsigned int cpu) | |||
248 | while (!cpu_isset(cpu, cpu_callin_map)) | 248 | while (!cpu_isset(cpu, cpu_callin_map)) |
249 | udelay(100); | 249 | udelay(100); |
250 | 250 | ||
251 | cpu_set(cpu, cpu_online_map); | 251 | set_cpu_online(cpu, true); |
252 | 252 | ||
253 | return 0; | 253 | return 0; |
254 | } | 254 | } |
@@ -320,13 +320,12 @@ void flush_tlb_mm(struct mm_struct *mm) | |||
320 | if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) { | 320 | if ((atomic_read(&mm->mm_users) != 1) || (current->mm != mm)) { |
321 | smp_on_other_tlbs(flush_tlb_mm_ipi, mm); | 321 | smp_on_other_tlbs(flush_tlb_mm_ipi, mm); |
322 | } else { | 322 | } else { |
323 | cpumask_t mask = cpu_online_map; | ||
324 | unsigned int cpu; | 323 | unsigned int cpu; |
325 | 324 | ||
326 | cpu_clear(smp_processor_id(), mask); | 325 | for_each_online_cpu(cpu) { |
327 | for_each_cpu_mask(cpu, mask) | 326 | if (cpu != smp_processor_id() && cpu_context(cpu, mm)) |
328 | if (cpu_context(cpu, mm)) | ||
329 | cpu_context(cpu, mm) = 0; | 327 | cpu_context(cpu, mm) = 0; |
328 | } | ||
330 | } | 329 | } |
331 | local_flush_tlb_mm(mm); | 330 | local_flush_tlb_mm(mm); |
332 | 331 | ||
@@ -360,13 +359,12 @@ void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned l | |||
360 | 359 | ||
361 | smp_on_other_tlbs(flush_tlb_range_ipi, &fd); | 360 | smp_on_other_tlbs(flush_tlb_range_ipi, &fd); |
362 | } else { | 361 | } else { |
363 | cpumask_t mask = cpu_online_map; | ||
364 | unsigned int cpu; | 362 | unsigned int cpu; |
365 | 363 | ||
366 | cpu_clear(smp_processor_id(), mask); | 364 | for_each_online_cpu(cpu) { |
367 | for_each_cpu_mask(cpu, mask) | 365 | if (cpu != smp_processor_id() && cpu_context(cpu, mm)) |
368 | if (cpu_context(cpu, mm)) | ||
369 | cpu_context(cpu, mm) = 0; | 366 | cpu_context(cpu, mm) = 0; |
367 | } | ||
370 | } | 368 | } |
371 | local_flush_tlb_range(vma, start, end); | 369 | local_flush_tlb_range(vma, start, end); |
372 | preempt_enable(); | 370 | preempt_enable(); |
@@ -407,13 +405,12 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long page) | |||
407 | 405 | ||
408 | smp_on_other_tlbs(flush_tlb_page_ipi, &fd); | 406 | smp_on_other_tlbs(flush_tlb_page_ipi, &fd); |
409 | } else { | 407 | } else { |
410 | cpumask_t mask = cpu_online_map; | ||
411 | unsigned int cpu; | 408 | unsigned int cpu; |
412 | 409 | ||
413 | cpu_clear(smp_processor_id(), mask); | 410 | for_each_online_cpu(cpu) { |
414 | for_each_cpu_mask(cpu, mask) | 411 | if (cpu != smp_processor_id() && cpu_context(cpu, vma->vm_mm)) |
415 | if (cpu_context(cpu, vma->vm_mm)) | ||
416 | cpu_context(cpu, vma->vm_mm) = 0; | 412 | cpu_context(cpu, vma->vm_mm) = 0; |
413 | } | ||
417 | } | 414 | } |
418 | local_flush_tlb_page(vma, page); | 415 | local_flush_tlb_page(vma, page); |
419 | preempt_enable(); | 416 | preempt_enable(); |