Lines Matching full:done

70 static void cpu_stop_init_done(struct cpu_stop_done *done, unsigned int nr_todo)  in cpu_stop_init_done()  argument
72 memset(done, 0, sizeof(*done)); in cpu_stop_init_done()
73 atomic_set(&done->nr_todo, nr_todo); in cpu_stop_init_done()
74 init_completion(&done->completion); in cpu_stop_init_done()
77 /* signal completion unless @done is NULL */
78 static void cpu_stop_signal_done(struct cpu_stop_done *done) in cpu_stop_signal_done() argument
80 if (atomic_dec_and_test(&done->nr_todo)) in cpu_stop_signal_done()
81 complete(&done->completion); in cpu_stop_signal_done()
105 else if (work->done) in cpu_stop_queue_work()
106 cpu_stop_signal_done(work->done); in cpu_stop_queue_work()
141 struct cpu_stop_done done; in stop_one_cpu() local
142 struct cpu_stop_work work = { .fn = fn, .arg = arg, .done = &done, .caller = _RET_IP_ }; in stop_one_cpu()
144 cpu_stop_init_done(&done, 1); in stop_one_cpu()
152 wait_for_completion(&done.completion); in stop_one_cpu()
153 return done.ret; in stop_one_cpu()
336 struct cpu_stop_done done; in stop_two_cpus() local
350 .done = &done, in stop_two_cpus()
354 cpu_stop_init_done(&done, 2); in stop_two_cpus()
362 wait_for_completion(&done.completion); in stop_two_cpus()
363 return done.ret; in stop_two_cpus()
393 struct cpu_stop_done *done) in queue_stop_cpus_work() argument
411 work->done = done; in queue_stop_cpus_work()
426 struct cpu_stop_done done; in __stop_cpus() local
428 cpu_stop_init_done(&done, cpumask_weight(cpumask)); in __stop_cpus()
429 if (!queue_stop_cpus_work(cpumask, fn, arg, &done)) in __stop_cpus()
431 wait_for_completion(&done.completion); in __stop_cpus()
432 return done.ret; in __stop_cpus()
504 struct cpu_stop_done *done = work->done; in cpu_stopper_thread() local
512 if (done) { in cpu_stopper_thread()
514 done->ret = ret; in cpu_stopper_thread()
515 cpu_stop_signal_done(done); in cpu_stopper_thread()
682 struct cpu_stop_done done; in stop_machine_from_inactive_cpu() local
695 cpu_stop_init_done(&done, num_active_cpus()); in stop_machine_from_inactive_cpu()
697 &done); in stop_machine_from_inactive_cpu()
701 while (!completion_done(&done.completion)) in stop_machine_from_inactive_cpu()
705 return ret ?: done.ret; in stop_machine_from_inactive_cpu()