Lines Matching refs:cpu

39 	long cpu = (long)hcpu;  in hotplug_cfd()  local
40 struct call_function_data *cfd = &per_cpu(cfd_data, cpu); in hotplug_cfd()
46 cpu_to_node(cpu))) in hotplug_cfd()
91 void *cpu = (void *)(long)smp_processor_id(); in call_function_init() local
97 hotplug_cfd(&hotplug_cfd_notifier, CPU_UP_PREPARE, cpu); in call_function_init()
144 static int generic_exec_single(int cpu, struct call_single_data *csd, in generic_exec_single() argument
147 if (cpu == smp_processor_id()) { in generic_exec_single()
162 if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu)) { in generic_exec_single()
181 if (llist_add(&csd->llist, &per_cpu(call_single_queue, cpu))) in generic_exec_single()
182 arch_send_call_function_single_ipi(cpu); in generic_exec_single()
271 int smp_call_function_single(int cpu, smp_call_func_t func, void *info, in smp_call_function_single() argument
300 err = generic_exec_single(cpu, csd, func, info); in smp_call_function_single()
327 int smp_call_function_single_async(int cpu, struct call_single_data *csd) in smp_call_function_single_async() argument
340 err = generic_exec_single(cpu, csd, csd->func, csd->info); in smp_call_function_single_async()
364 unsigned int cpu; in smp_call_function_any() local
369 cpu = get_cpu(); in smp_call_function_any()
370 if (cpumask_test_cpu(cpu, mask)) in smp_call_function_any()
374 nodemask = cpumask_of_node(cpu_to_node(cpu)); in smp_call_function_any()
375 for (cpu = cpumask_first_and(nodemask, mask); cpu < nr_cpu_ids; in smp_call_function_any()
376 cpu = cpumask_next_and(cpu, nodemask, mask)) { in smp_call_function_any()
377 if (cpu_online(cpu)) in smp_call_function_any()
382 cpu = cpumask_any_and(mask, cpu_online_mask); in smp_call_function_any()
384 ret = smp_call_function_single(cpu, func, info, wait); in smp_call_function_any()
408 int cpu, next_cpu, this_cpu = smp_processor_id(); in smp_call_function_many() local
420 cpu = cpumask_first_and(mask, cpu_online_mask); in smp_call_function_many()
421 if (cpu == this_cpu) in smp_call_function_many()
422 cpu = cpumask_next_and(cpu, mask, cpu_online_mask); in smp_call_function_many()
425 if (cpu >= nr_cpu_ids) in smp_call_function_many()
429 next_cpu = cpumask_next_and(cpu, mask, cpu_online_mask); in smp_call_function_many()
435 smp_call_function_single(cpu, func, info, wait); in smp_call_function_many()
448 for_each_cpu(cpu, cfd->cpumask) { in smp_call_function_many()
449 struct call_single_data *csd = per_cpu_ptr(cfd->csd, cpu); in smp_call_function_many()
456 llist_add(&csd->llist, &per_cpu(call_single_queue, cpu)); in smp_call_function_many()
463 for_each_cpu(cpu, cfd->cpumask) { in smp_call_function_many()
466 csd = per_cpu_ptr(cfd->csd, cpu); in smp_call_function_many()
569 unsigned int cpu; in smp_init() local
574 for_each_present_cpu(cpu) { in smp_init()
577 if (!cpu_online(cpu)) in smp_init()
578 cpu_up(cpu); in smp_init()
625 int cpu = get_cpu(); in on_each_cpu_mask() local
628 if (cpumask_test_cpu(cpu, mask)) { in on_each_cpu_mask()
665 void on_each_cpu_cond(bool (*cond_func)(int cpu, void *info), in on_each_cpu_cond() argument
670 int cpu, ret; in on_each_cpu_cond() local
676 for_each_online_cpu(cpu) in on_each_cpu_cond()
677 if (cond_func(cpu, info)) in on_each_cpu_cond()
678 cpumask_set_cpu(cpu, cpus); in on_each_cpu_cond()
688 for_each_online_cpu(cpu) in on_each_cpu_cond()
689 if (cond_func(cpu, info)) { in on_each_cpu_cond()
690 ret = smp_call_function_single(cpu, func, in on_each_cpu_cond()
730 int cpu; in wake_up_all_idle_cpus() local
733 for_each_online_cpu(cpu) { in wake_up_all_idle_cpus()
734 if (cpu == smp_processor_id()) in wake_up_all_idle_cpus()
737 wake_up_if_idle(cpu); in wake_up_all_idle_cpus()