Lines Matching refs:cpu
101 int smpcfd_prepare_cpu(unsigned int cpu) in smpcfd_prepare_cpu() argument
103 struct call_function_data *cfd = &per_cpu(cfd_data, cpu); in smpcfd_prepare_cpu()
106 cpu_to_node(cpu))) in smpcfd_prepare_cpu()
109 cpu_to_node(cpu))) { in smpcfd_prepare_cpu()
123 int smpcfd_dead_cpu(unsigned int cpu) in smpcfd_dead_cpu() argument
125 struct call_function_data *cfd = &per_cpu(cfd_data, cpu); in smpcfd_dead_cpu()
133 int smpcfd_dying_cpu(unsigned int cpu) in smpcfd_dying_cpu() argument
289 static void csd_lock_print_extended(struct __call_single_data *csd, int cpu) in csd_lock_print_extended() argument
291 struct cfd_seq_local *seq = &per_cpu(cfd_seq_local, cpu); in csd_lock_print_extended()
294 struct cfd_percpu *pcpu = per_cpu_ptr(cfd->pcpu, cpu); in csd_lock_print_extended()
302 cfd_seq_data_add(pcpu->seq_queue, srccpu, cpu, CFD_SEQ_QUEUE, data, &n_data, now); in csd_lock_print_extended()
303 cfd_seq_data_add(pcpu->seq_ipi, srccpu, cpu, CFD_SEQ_IPI, data, &n_data, now); in csd_lock_print_extended()
304 cfd_seq_data_add(pcpu->seq_noipi, srccpu, cpu, CFD_SEQ_NOIPI, data, &n_data, now); in csd_lock_print_extended()
309 cfd_seq_data_add(seq->idle, CFD_SEQ_NOCPU, cpu, CFD_SEQ_IDLE, data, &n_data, now); in csd_lock_print_extended()
310 cfd_seq_data_add(seq->gotipi, CFD_SEQ_NOCPU, cpu, CFD_SEQ_GOTIPI, data, &n_data, now); in csd_lock_print_extended()
311 cfd_seq_data_add(seq->handle, CFD_SEQ_NOCPU, cpu, CFD_SEQ_HANDLE, data, &n_data, now); in csd_lock_print_extended()
312 cfd_seq_data_add(seq->dequeue, CFD_SEQ_NOCPU, cpu, CFD_SEQ_DEQUEUE, data, &n_data, now); in csd_lock_print_extended()
313 cfd_seq_data_add(seq->hdlend, CFD_SEQ_NOCPU, cpu, CFD_SEQ_HDLEND, data, &n_data, now); in csd_lock_print_extended()
330 int cpu = -1; in csd_lock_wait_toolong() local
341 cpu = csd_lock_wait_getcpu(csd); in csd_lock_wait_toolong()
343 *bug_id, raw_smp_processor_id(), cpu); in csd_lock_wait_toolong()
356 cpu = csd_lock_wait_getcpu(csd); in csd_lock_wait_toolong()
357 if (WARN_ONCE(cpu < 0 || cpu >= nr_cpu_ids, "%s: cpu = %d\n", __func__, cpu)) in csd_lock_wait_toolong()
360 cpux = cpu; in csd_lock_wait_toolong()
366 cpu, csd->func, csd->info); in csd_lock_wait_toolong()
381 if (cpu >= 0) { in csd_lock_wait_toolong()
383 csd_lock_print_extended(csd, cpu); in csd_lock_wait_toolong()
384 dump_cpu_task(cpu); in csd_lock_wait_toolong()
386 … Re-sending CSD lock (#%d) IPI from CPU#%02d to CPU#%02d\n", *bug_id, raw_smp_processor_id(), cpu); in csd_lock_wait_toolong()
387 arch_send_call_function_single_ipi(cpu); in csd_lock_wait_toolong()
427 static void __smp_call_single_queue_debug(int cpu, struct llist_node *node) in __smp_call_single_queue_debug() argument
432 struct cfd_percpu *pcpu = per_cpu_ptr(cfd->pcpu, cpu); in __smp_call_single_queue_debug()
434 cfd_seq_store(pcpu->seq_queue, this_cpu, cpu, CFD_SEQ_QUEUE); in __smp_call_single_queue_debug()
435 if (llist_add(node, &per_cpu(call_single_queue, cpu))) { in __smp_call_single_queue_debug()
436 cfd_seq_store(pcpu->seq_ipi, this_cpu, cpu, CFD_SEQ_IPI); in __smp_call_single_queue_debug()
437 cfd_seq_store(seq->ping, this_cpu, cpu, CFD_SEQ_PING); in __smp_call_single_queue_debug()
438 send_call_function_single_ipi(cpu); in __smp_call_single_queue_debug()
439 cfd_seq_store(seq->pinged, this_cpu, cpu, CFD_SEQ_PINGED); in __smp_call_single_queue_debug()
441 cfd_seq_store(pcpu->seq_noipi, this_cpu, cpu, CFD_SEQ_NOIPI); in __smp_call_single_queue_debug()
482 void __smp_call_single_queue(int cpu, struct llist_node *node) in __smp_call_single_queue() argument
491 __smp_call_single_queue_debug(cpu, node); in __smp_call_single_queue()
508 if (llist_add(node, &per_cpu(call_single_queue, cpu))) in __smp_call_single_queue()
509 send_call_function_single_ipi(cpu); in __smp_call_single_queue()
517 static int generic_exec_single(int cpu, struct __call_single_data *csd) in generic_exec_single() argument
519 if (cpu == smp_processor_id()) { in generic_exec_single()
537 if ((unsigned)cpu >= nr_cpu_ids || !cpu_online(cpu)) { in generic_exec_single()
542 __smp_call_single_queue(cpu, &csd->node.llist); in generic_exec_single()
738 int smp_call_function_single(int cpu, smp_call_func_t func, void *info, in smp_call_function_single() argument
781 csd->node.dst = cpu; in smp_call_function_single()
784 err = generic_exec_single(cpu, csd); in smp_call_function_single()
818 int smp_call_function_single_async(int cpu, struct __call_single_data *csd) in smp_call_function_single_async() argument
832 err = generic_exec_single(cpu, csd); in smp_call_function_single_async()
858 unsigned int cpu; in smp_call_function_any() local
863 cpu = get_cpu(); in smp_call_function_any()
864 if (cpumask_test_cpu(cpu, mask)) in smp_call_function_any()
868 nodemask = cpumask_of_node(cpu_to_node(cpu)); in smp_call_function_any()
869 for (cpu = cpumask_first_and(nodemask, mask); cpu < nr_cpu_ids; in smp_call_function_any()
870 cpu = cpumask_next_and(cpu, nodemask, mask)) { in smp_call_function_any()
871 if (cpu_online(cpu)) in smp_call_function_any()
876 cpu = cpumask_any_and(mask, cpu_online_mask); in smp_call_function_any()
878 ret = smp_call_function_single(cpu, func, info, wait); in smp_call_function_any()
898 int cpu, last_cpu, this_cpu = smp_processor_id(); in smp_call_function_many_cond() local
930 cpu = cpumask_first_and(mask, cpu_online_mask); in smp_call_function_many_cond()
931 if (cpu == this_cpu) in smp_call_function_many_cond()
932 cpu = cpumask_next_and(cpu, mask, cpu_online_mask); in smp_call_function_many_cond()
933 if (cpu < nr_cpu_ids) in smp_call_function_many_cond()
942 for_each_cpu(cpu, cfd->cpumask) { in smp_call_function_many_cond()
943 struct cfd_percpu *pcpu = per_cpu_ptr(cfd->pcpu, cpu); in smp_call_function_many_cond()
946 if (cond_func && !cond_func(cpu, info)) in smp_call_function_many_cond()
956 csd->node.dst = cpu; in smp_call_function_many_cond()
958 cfd_seq_store(pcpu->seq_queue, this_cpu, cpu, CFD_SEQ_QUEUE); in smp_call_function_many_cond()
959 if (llist_add(&csd->node.llist, &per_cpu(call_single_queue, cpu))) { in smp_call_function_many_cond()
960 __cpumask_set_cpu(cpu, cfd->cpumask_ipi); in smp_call_function_many_cond()
962 last_cpu = cpu; in smp_call_function_many_cond()
964 cfd_seq_store(pcpu->seq_ipi, this_cpu, cpu, CFD_SEQ_IPI); in smp_call_function_many_cond()
966 cfd_seq_store(pcpu->seq_noipi, this_cpu, cpu, CFD_SEQ_NOIPI); in smp_call_function_many_cond()
994 for_each_cpu(cpu, cfd->cpumask) { in smp_call_function_many_cond()
997 csd = &per_cpu_ptr(cfd->pcpu, cpu)->csd; in smp_call_function_many_cond()
1202 int cpu; in wake_up_all_idle_cpus() local
1204 for_each_possible_cpu(cpu) { in wake_up_all_idle_cpus()
1206 if (cpu != smp_processor_id() && cpu_online(cpu)) in wake_up_all_idle_cpus()
1207 wake_up_if_idle(cpu); in wake_up_all_idle_cpus()
1232 int cpu; member
1240 if (sscs->cpu >= 0) in smp_call_on_cpu_callback()
1241 hypervisor_pin_vcpu(sscs->cpu); in smp_call_on_cpu_callback()
1243 if (sscs->cpu >= 0) in smp_call_on_cpu_callback()
1249 int smp_call_on_cpu(unsigned int cpu, int (*func)(void *), void *par, bool phys) in smp_call_on_cpu() argument
1255 .cpu = phys ? cpu : -1, in smp_call_on_cpu()
1260 if (cpu >= nr_cpu_ids || !cpu_online(cpu)) in smp_call_on_cpu()
1263 queue_work_on(cpu, system_wq, &sscs.work); in smp_call_on_cpu()