Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\stop_machine.c Create Date:2022-07-28 11:21:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:stop_machine_from_inactive_cpu - stop_machine() from inactive CPU*@fn: the function to run*@data: the data ptr for the @fn()*@cpus: the cpus to run the @fn() on (NULL = any online cpu)* This is identical to stop_machine() but can be called from a CPU which

Proto:int stop_machine_from_inactive_cpu(cpu_stop_fn_t fn, void *data, const struct cpumask *cpus)

Type:int

Parameter:

TypeParameterName
cpu_stop_fn_tfn
void *data
const struct cpumask *cpus
669  struct multi_stop_data msdata = {fn = fn, data = data, active_cpus = cpus}
675  BUG_ON(cpu_active(These macros fold the SMP functionality into a single CPU system()))
676  Like num_online_cpus(), but hotplug cpu uses us, so we need this. = num_active_cpus() + 1
679  When Not mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically cycle
680  cpu_relax()
683  set_state( & msdata, MULTI_STOP_PREPARE)
684  cpu_stop_init_done( & done, num_active_cpus())
685  queue_stop_cpus_work(cpu_active_mask, This is the cpu_stop function which stops the CPU. , & msdata, & done)
687  ret = This is the cpu_stop function which stops the CPU.
690  When Not mpletion_done - Test to see if a completion has any waiters*@x: completion structure* Return: 0 if there are waiters (wait_for_completion() in progress)* 1 if there are no waiters.* Note, this will always return true if complete_all() was called on @X. cycle
691  cpu_relax()
693  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
694  Return If ret Else collected return value