Lines Matching full:fn

46 	cpu_stop_fn_t		fn;  member
63 printk("%sStopper: %pS <- %pS\n", log_lvl, stopper->fn, (void *)stopper->caller); in print_stop_info()
116 * @fn: function to execute
117 * @arg: argument to @fn
119 * Execute @fn(@arg) on @cpu. @fn is run in a process context with
124 * This function doesn't guarantee @cpu stays online till @fn
126 * partially or fully on different cpus. @fn should either be ready
134 * -ENOENT if @fn(@arg) was not executed because @cpu was offline;
135 * otherwise, the return value of @fn.
137 int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg) in stop_one_cpu() argument
140 struct cpu_stop_work work = { .fn = fn, .arg = arg, .done = &done, .caller = _RET_IP_ }; in stop_one_cpu()
169 cpu_stop_fn_t fn; member
238 err = msdata->fn(msdata->data); in multi_cpu_stop()
328 * @fn: function to execute
329 * @arg: argument to @fn
331 * Stops both the current and specified CPU and runs @fn on one of them.
335 int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg) in stop_two_cpus() argument
342 .fn = fn, in stop_two_cpus()
349 .fn = multi_cpu_stop, in stop_two_cpus()
370 * @fn: function to execute
371 * @arg: argument to @fn
376 * and will remain untouched until stopper starts executing @fn.
382 * true if cpu_stop_work was queued successfully and @fn will be called,
385 bool stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg, in stop_one_cpu_nowait() argument
388 *work_buf = (struct cpu_stop_work){ .fn = fn, .arg = arg, .caller = _RET_IP_, }; in stop_one_cpu_nowait()
393 cpu_stop_fn_t fn, void *arg, in queue_stop_cpus_work() argument
403 * to enter @fn which can lead to deadlock. in queue_stop_cpus_work()
410 work->fn = fn; in queue_stop_cpus_work()
425 cpu_stop_fn_t fn, void *arg) in __stop_cpus() argument
430 if (!queue_stop_cpus_work(cpumask, fn, arg, &done)) in __stop_cpus()
439 * @fn: function to execute
440 * @arg: argument to @fn
442 * Execute @fn(@arg) on online cpus in @cpumask. On each target cpu,
443 * @fn is run in a process context with the highest priority
448 * till @fn completes. If some cpus go down in the middle, execution
449 * on the cpu may happen partially or fully on different cpus. @fn
453 * All stop_cpus() calls are serialized making it safe for @fn to wait
460 * -ENOENT if @fn(@arg) was not executed at all because all cpus in
461 * @cpumask were offline; otherwise, 0 if all executions of @fn
464 static int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg) in stop_cpus() argument
470 ret = __stop_cpus(cpumask, fn, arg); in stop_cpus()
503 cpu_stop_fn_t fn = work->fn; in cpu_stopper_thread() local
510 stopper->fn = fn; in cpu_stopper_thread()
512 ret = fn(arg); in cpu_stopper_thread()
519 stopper->fn = NULL; in cpu_stopper_thread()
522 "cpu_stop: %ps(%p) leaked preempt count\n", fn, arg); in cpu_stopper_thread()
587 int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data, in stop_machine_cpuslocked() argument
591 .fn = fn, in stop_machine_cpuslocked()
612 ret = (*fn)(data); in stop_machine_cpuslocked()
623 int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus) in stop_machine() argument
629 ret = stop_machine_cpuslocked(fn, data, cpus); in stop_machine()
636 int stop_core_cpuslocked(unsigned int cpu, cpu_stop_fn_t fn, void *data) in stop_core_cpuslocked() argument
641 .fn = fn, in stop_core_cpuslocked()
658 * @fn: the function to run
659 * @data: the data ptr for the @fn()
660 * @cpus: the cpus to run the @fn() on (NULL = any online cpu)
668 * using busy-wait for synchronization and executing @fn directly for local
675 * 0 if all executions of @fn returned 0, any non zero return value if any
678 int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data, in stop_machine_from_inactive_cpu() argument
681 struct multi_stop_data msdata = { .fn = fn, .data = data, in stop_machine_from_inactive_cpu()