@@ -326,14 +326,14 @@ void __init smp_prepare_boot_cpu(void)
326326 per_cpu (cpu_data , cpu ).idle = current ;
327327}
328328
329- static void send_ipi_message (cpumask_t callmap , enum ipi_msg_type msg )
329+ static void send_ipi_message (const struct cpumask * mask , enum ipi_msg_type msg )
330330{
331331 unsigned long flags ;
332332 unsigned int cpu ;
333333
334334 local_irq_save (flags );
335335
336- for_each_cpu_mask (cpu , callmap ) {
336+ for_each_cpu (cpu , mask ) {
337337 struct ipi_data * ipi = & per_cpu (ipi_data , cpu );
338338
339339 spin_lock (& ipi -> lock );
@@ -344,19 +344,19 @@ static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
344344 /*
345345 * Call the platform specific cross-CPU call function.
346346 */
347- smp_cross_call (callmap );
347+ smp_cross_call (mask );
348348
349349 local_irq_restore (flags );
350350}
351351
352- void arch_send_call_function_ipi ( cpumask_t mask )
352+ void arch_send_call_function_ipi_mask ( const struct cpumask * mask )
353353{
354354 send_ipi_message (mask , IPI_CALL_FUNC );
355355}
356356
357357void arch_send_call_function_single_ipi (int cpu )
358358{
359- send_ipi_message (cpumask_of_cpu (cpu ), IPI_CALL_FUNC_SINGLE );
359+ send_ipi_message (cpumask_of (cpu ), IPI_CALL_FUNC_SINGLE );
360360}
361361
362362void show_ipi_list (struct seq_file * p )
@@ -498,17 +498,10 @@ asmlinkage void __exception do_IPI(struct pt_regs *regs)
498498
499499void smp_send_reschedule (int cpu )
500500{
501- send_ipi_message (cpumask_of_cpu (cpu ), IPI_RESCHEDULE );
501+ send_ipi_message (cpumask_of (cpu ), IPI_RESCHEDULE );
502502}
503503
504- void smp_send_timer (void )
505- {
506- cpumask_t mask = cpu_online_map ;
507- cpu_clear (smp_processor_id (), mask );
508- send_ipi_message (mask , IPI_TIMER );
509- }
510-
511- void smp_timer_broadcast (cpumask_t mask )
504+ void smp_timer_broadcast (const struct cpumask * mask )
512505{
513506 send_ipi_message (mask , IPI_TIMER );
514507}
@@ -517,7 +510,7 @@ void smp_send_stop(void)
517510{
518511 cpumask_t mask = cpu_online_map ;
519512 cpu_clear (smp_processor_id (), mask );
520- send_ipi_message (mask , IPI_CPU_STOP );
513+ send_ipi_message (& mask , IPI_CPU_STOP );
521514}
522515
523516/*
@@ -528,20 +521,17 @@ int setup_profiling_timer(unsigned int multiplier)
528521 return - EINVAL ;
529522}
530523
531- static int
532- on_each_cpu_mask (void (* func )(void * ), void * info , int wait , cpumask_t mask )
524+ static void
525+ on_each_cpu_mask (void (* func )(void * ), void * info , int wait ,
526+ const struct cpumask * mask )
533527{
534- int ret = 0 ;
535-
536528 preempt_disable ();
537529
538- ret = smp_call_function_mask (mask , func , info , wait );
539- if (cpu_isset (smp_processor_id (), mask ))
530+ smp_call_function_many (mask , func , info , wait );
531+ if (cpumask_test_cpu (smp_processor_id (), mask ))
540532 func (info );
541533
542534 preempt_enable ();
543-
544- return ret ;
545535}
546536
547537/**********************************************************************/
@@ -602,20 +592,17 @@ void flush_tlb_all(void)
602592
603593void flush_tlb_mm (struct mm_struct * mm )
604594{
605- cpumask_t mask = mm -> cpu_vm_mask ;
606-
607- on_each_cpu_mask (ipi_flush_tlb_mm , mm , 1 , mask );
595+ on_each_cpu_mask (ipi_flush_tlb_mm , mm , 1 , & mm -> cpu_vm_mask );
608596}
609597
610598void flush_tlb_page (struct vm_area_struct * vma , unsigned long uaddr )
611599{
612- cpumask_t mask = vma -> vm_mm -> cpu_vm_mask ;
613600 struct tlb_args ta ;
614601
615602 ta .ta_vma = vma ;
616603 ta .ta_start = uaddr ;
617604
618- on_each_cpu_mask (ipi_flush_tlb_page , & ta , 1 , mask );
605+ on_each_cpu_mask (ipi_flush_tlb_page , & ta , 1 , & vma -> vm_mm -> cpu_vm_mask );
619606}
620607
621608void flush_tlb_kernel_page (unsigned long kaddr )
@@ -630,14 +617,13 @@ void flush_tlb_kernel_page(unsigned long kaddr)
630617void flush_tlb_range (struct vm_area_struct * vma ,
631618 unsigned long start , unsigned long end )
632619{
633- cpumask_t mask = vma -> vm_mm -> cpu_vm_mask ;
634620 struct tlb_args ta ;
635621
636622 ta .ta_vma = vma ;
637623 ta .ta_start = start ;
638624 ta .ta_end = end ;
639625
640- on_each_cpu_mask (ipi_flush_tlb_range , & ta , 1 , mask );
626+ on_each_cpu_mask (ipi_flush_tlb_range , & ta , 1 , & vma -> vm_mm -> cpu_vm_mask );
641627}
642628
643629void flush_tlb_kernel_range (unsigned long start , unsigned long end )
0 commit comments