• Home
  • Raw
  • Download

Lines Matching refs: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()
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()
337 struct cpu_stop_done done; in stop_two_cpus() local
351 .done = &done, in stop_two_cpus()
355 cpu_stop_init_done(&done, 2); in stop_two_cpus()
363 wait_for_completion(&done.completion); in stop_two_cpus()
364 return done.ret; in stop_two_cpus()
395 struct cpu_stop_done *done) in queue_stop_cpus_work() argument
413 work->done = done; in queue_stop_cpus_work()
428 struct cpu_stop_done done; in __stop_cpus() local
430 cpu_stop_init_done(&done, cpumask_weight(cpumask)); in __stop_cpus()
431 if (!queue_stop_cpus_work(cpumask, fn, arg, &done)) in __stop_cpus()
433 wait_for_completion(&done.completion); in __stop_cpus()
434 return done.ret; in __stop_cpus()
506 struct cpu_stop_done *done = work->done; in cpu_stopper_thread() local
514 if (done) { in cpu_stopper_thread()
516 done->ret = ret; in cpu_stopper_thread()
517 cpu_stop_signal_done(done); in cpu_stopper_thread()
684 struct cpu_stop_done done; in stop_machine_from_inactive_cpu() local
697 cpu_stop_init_done(&done, num_active_cpus()); in stop_machine_from_inactive_cpu()
699 &done); in stop_machine_from_inactive_cpu()
703 while (!completion_done(&done.completion)) in stop_machine_from_inactive_cpu()
707 return ret ?: done.ret; in stop_machine_from_inactive_cpu()