aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-09-24 11:34:43 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-09-23 20:04:43 -0400
commit81065e4f2b525410d0c80040140e086abfbf7de2 (patch)
tree519fc9f0a8905abfb03198ef29a0fbf7326b0ee2 /arch/alpha
parente50a6f19537362ed61f7f74af724345975e602ed (diff)
cpumask: arch_send_call_function_ipi_mask: alpha
We're weaning the core code off handing cpumask's around on-stack. This introduces arch_send_call_function_ipi_mask(). We also take the chance to wean the send_ipi_message off the obsolescent for_each_cpu_mask(): making it take a pointer seemed the most natural way to do this. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/include/asm/smp.h3
-rw-r--r--arch/alpha/kernel/smp.c14
2 files changed, 9 insertions, 8 deletions
diff --git a/arch/alpha/include/asm/smp.h b/arch/alpha/include/asm/smp.h
index 547e90951cec..8818a1bcdc8b 100644
--- a/arch/alpha/include/asm/smp.h
+++ b/arch/alpha/include/asm/smp.h
@@ -47,7 +47,8 @@ extern struct cpuinfo_alpha cpu_data[NR_CPUS];
47extern int smp_num_cpus; 47extern int smp_num_cpus;
48 48
49extern void arch_send_call_function_single_ipi(int cpu); 49extern void arch_send_call_function_single_ipi(int cpu);
50extern void arch_send_call_function_ipi(cpumask_t mask); 50extern void arch_send_call_function_ipi_mask(const struct cpumask *mask);
51#define arch_send_call_function_ipi_mask arch_send_call_function_ipi_mask
51 52
52#else /* CONFIG_SMP */ 53#else /* CONFIG_SMP */
53 54
diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c
index b1fe5674c3a1..42aa078a5e4d 100644
--- a/arch/alpha/kernel/smp.c
+++ b/arch/alpha/kernel/smp.c
@@ -548,16 +548,16 @@ setup_profiling_timer(unsigned int multiplier)
548 548
549 549
550static void 550static void
551send_ipi_message(cpumask_t to_whom, enum ipi_message_type operation) 551send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation)
552{ 552{
553 int i; 553 int i;
554 554
555 mb(); 555 mb();
556 for_each_cpu_mask(i, to_whom) 556 for_each_cpu(i, to_whom)
557 set_bit(operation, &ipi_data[i].bits); 557 set_bit(operation, &ipi_data[i].bits);
558 558
559 mb(); 559 mb();
560 for_each_cpu_mask(i, to_whom) 560 for_each_cpu(i, to_whom)
561 wripir(i); 561 wripir(i);
562} 562}
563 563
@@ -624,7 +624,7 @@ smp_send_reschedule(int cpu)
624 printk(KERN_WARNING 624 printk(KERN_WARNING
625 "smp_send_reschedule: Sending IPI to self.\n"); 625 "smp_send_reschedule: Sending IPI to self.\n");
626#endif 626#endif
627 send_ipi_message(cpumask_of_cpu(cpu), IPI_RESCHEDULE); 627 send_ipi_message(cpumask_of(cpu), IPI_RESCHEDULE);
628} 628}
629 629
630void 630void
@@ -636,17 +636,17 @@ smp_send_stop(void)
636 if (hard_smp_processor_id() != boot_cpu_id) 636 if (hard_smp_processor_id() != boot_cpu_id)
637 printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n"); 637 printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n");
638#endif 638#endif
639 send_ipi_message(to_whom, IPI_CPU_STOP); 639 send_ipi_message(&to_whom, IPI_CPU_STOP);
640} 640}
641 641
642void arch_send_call_function_ipi(cpumask_t mask) 642void arch_send_call_function_ipi_mask(const struct cpumask *mask)
643{ 643{
644 send_ipi_message(mask, IPI_CALL_FUNC); 644 send_ipi_message(mask, IPI_CALL_FUNC);
645} 645}
646 646
647void arch_send_call_function_single_ipi(int cpu) 647void arch_send_call_function_single_ipi(int cpu)
648{ 648{
649 send_ipi_message(cpumask_of_cpu(cpu), IPI_CALL_FUNC_SINGLE); 649 send_ipi_message(cpumask_of(cpu), IPI_CALL_FUNC_SINGLE);
650} 650}
651 651
652static void 652static void