Lines Matching defs:fn

46 	cpu_stop_fn_t		fn;
63 printk("%sStopper: %pS <- %pS\n", log_lvl, stopper->fn, (void *)stopper->caller);
118 * @fn: function to execute
119 * @arg: argument to @fn
121 * Execute @fn(@arg) on @cpu. @fn is run in a process context with
126 * This function doesn't guarantee @cpu stays online till @fn
128 * partially or fully on different cpus. @fn should either be ready
136 * -ENOENT if @fn(@arg) was not executed because @cpu was offline;
137 * otherwise, the return value of @fn.
139 int stop_one_cpu(unsigned int cpu, cpu_stop_fn_t fn, void *arg)
142 struct cpu_stop_work work = { .fn = fn, .arg = arg, .done = &done, .caller = _RET_IP_ };
171 cpu_stop_fn_t fn;
240 err = msdata->fn(msdata->data);
327 * @fn: function to execute
328 * @arg: argument to @fn
330 * Stops both the current and specified CPU and runs @fn on one of them.
334 int stop_two_cpus(unsigned int cpu1, unsigned int cpu2, cpu_stop_fn_t fn, void *arg)
341 .fn = fn,
348 .fn = multi_cpu_stop,
369 * @fn: function to execute
370 * @arg: argument to @fn
375 * and will remain untouched until stopper starts executing @fn.
381 * true if cpu_stop_work was queued successfully and @fn will be called,
384 bool stop_one_cpu_nowait(unsigned int cpu, cpu_stop_fn_t fn, void *arg,
387 *work_buf = (struct cpu_stop_work){ .fn = fn, .arg = arg, .caller = _RET_IP_, };
392 cpu_stop_fn_t fn, void *arg,
402 * to enter @fn which can lead to deadlock.
409 work->fn = fn;
424 cpu_stop_fn_t fn, void *arg)
429 if (!queue_stop_cpus_work(cpumask, fn, arg, &done))
438 * @fn: function to execute
439 * @arg: argument to @fn
441 * Execute @fn(@arg) on online cpus in @cpumask. On each target cpu,
442 * @fn is run in a process context with the highest priority
447 * till @fn completes. If some cpus go down in the middle, execution
448 * on the cpu may happen partially or fully on different cpus. @fn
452 * All stop_cpus() calls are serialized making it safe for @fn to wait
459 * -ENOENT if @fn(@arg) was not executed at all because all cpus in
460 * @cpumask were offline; otherwise, 0 if all executions of @fn
463 static int stop_cpus(const struct cpumask *cpumask, cpu_stop_fn_t fn, void *arg)
469 ret = __stop_cpus(cpumask, fn, arg);
502 cpu_stop_fn_t fn = work->fn;
509 stopper->fn = fn;
511 ret = fn(arg);
518 stopper->fn = NULL;
521 "cpu_stop: %ps(%p) leaked preempt count\n", fn, arg);
586 int stop_machine_cpuslocked(cpu_stop_fn_t fn, void *data,
590 .fn = fn,
611 ret = (*fn)(data);
622 int stop_machine(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus)
628 ret = stop_machine_cpuslocked(fn, data, cpus);
635 int stop_core_cpuslocked(unsigned int cpu, cpu_stop_fn_t fn, void *data)
640 .fn = fn,
657 * @fn: the function to run
658 * @data: the data ptr for the @fn()
659 * @cpus: the cpus to run the @fn() on (NULL = any online cpu)
667 * using busy-wait for synchronization and executing @fn directly for local
674 * 0 if all executions of @fn returned 0, any non zero return value if any
677 int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data,
680 struct multi_stop_data msdata = { .fn = fn, .data = data,