Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+9 -8
+2 -1
arch/alpha/include/asm/smp.h
··· 47 47 extern int smp_num_cpus; 48 48 49 49 extern void arch_send_call_function_single_ipi(int cpu); 50 - extern void arch_send_call_function_ipi(cpumask_t mask); 50 + extern 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 53 #else /* CONFIG_SMP */ 53 54
+7 -7
arch/alpha/kernel/smp.c
··· 548 548 549 549 550 550 static void 551 - send_ipi_message(cpumask_t to_whom, enum ipi_message_type operation) 551 + send_ipi_message(const struct cpumask *to_whom, enum ipi_message_type operation) 552 552 { 553 553 int i; 554 554 555 555 mb(); 556 - for_each_cpu_mask(i, to_whom) 556 + for_each_cpu(i, to_whom) 557 557 set_bit(operation, &ipi_data[i].bits); 558 558 559 559 mb(); 560 - for_each_cpu_mask(i, to_whom) 560 + for_each_cpu(i, to_whom) 561 561 wripir(i); 562 562 } 563 563 ··· 624 624 printk(KERN_WARNING 625 625 "smp_send_reschedule: Sending IPI to self.\n"); 626 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 630 630 void ··· 636 636 if (hard_smp_processor_id() != boot_cpu_id) 637 637 printk(KERN_WARNING "smp_send_stop: Not on boot cpu.\n"); 638 638 #endif 639 - send_ipi_message(to_whom, IPI_CPU_STOP); 639 + send_ipi_message(&to_whom, IPI_CPU_STOP); 640 640 } 641 641 642 - void arch_send_call_function_ipi(cpumask_t mask) 642 + void arch_send_call_function_ipi_mask(const struct cpumask *mask) 643 643 { 644 644 send_ipi_message(mask, IPI_CALL_FUNC); 645 645 } 646 646 647 647 void 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 652 652 static void