| /linux/drivers/acpi/acpica/ |
| H A D | exmutex.c | 4 * Module Name: exmutex - ASL Mutex Acquire/Release functions 27 * PARAMETERS: obj_desc - The mutex to be unlinked 31 * DESCRIPTION: Remove a mutex from the "AcquiredMutex" list 37 struct acpi_thread_state *thread = obj_desc->mutex.owner_thread; in acpi_ex_unlink_mutex() 45 if (obj_desc->mutex.next) { in acpi_ex_unlink_mutex() 46 (obj_desc->mutex.next)->mutex.prev = obj_desc->mutex.prev; in acpi_ex_unlink_mutex() 49 if (obj_desc->mutex.prev) { in acpi_ex_unlink_mutex() 50 (obj_desc->mutex.prev)->mutex.next = obj_desc->mutex.next; in acpi_ex_unlink_mutex() 53 * Migrate the previous sync level associated with this mutex to in acpi_ex_unlink_mutex() 54 * the previous mutex on the list so that it may be preserved. in acpi_ex_unlink_mutex() [all …]
|
| H A D | utxfmutex.c | 4 * Module Name: utxfmutex - external AML mutex access functions 25 * PARAMETERS: handle - Mutex or prefix handle (optional) 26 * pathname - Mutex pathname (optional) 27 * ret_obj - Where the mutex object is returned 31 * DESCRIPTION: Get an AML mutex object. The mutex node is pointed to by 52 /* Get a the namespace node for the mutex */ in acpi_ut_get_mutex_object() 64 /* Ensure that we actually have a Mutex object */ in acpi_ut_get_mutex_object() 70 /* Get the low-level mutex object */ in acpi_ut_get_mutex_object() 85 * PARAMETERS: handle - Mutex or prefix handle (optional) 86 * pathname - Mutex pathname (optional) [all …]
|
| H A D | utmutex.c | 4 * Module Name: utmutex - local mutex support 27 * DESCRIPTION: Create the system mutex objects. This includes mutexes, 39 /* Create each of the predefined mutex objects */ in acpi_ut_mutex_initialize() 65 /* Mutex for _OSI support */ in acpi_ut_mutex_initialize() 90 * DESCRIPTION: Delete all of the system mutex objects. This includes mutexes, 101 /* Delete each predefined mutex object */ in acpi_ut_mutex_terminate() 125 * PARAMETERS: mutex_ID - ID of the mutex to be created 129 * DESCRIPTION: Create a mutex object. 139 if (!acpi_gbl_mutex_info[mutex_id].mutex) { in acpi_ut_create_mutex() 141 acpi_os_create_mutex(&acpi_gbl_mutex_info[mutex_id].mutex); in acpi_ut_create_mutex() [all …]
|
| H A D | dsmethod.c | 138 * Mark the method as serialized. Later code will create a mutex for in acpi_ds_detect_named_opcodes() 242 * DESCRIPTION: Create a mutex object for a serialized control method 254 /* Create the new mutex object */ in acpi_ds_create_method_mutex() 261 /* Create the actual OS Mutex */ in acpi_ds_create_method_mutex() 263 status = acpi_os_create_mutex(&mutex_desc->mutex.os_mutex); in acpi_ds_create_method_mutex() 269 mutex_desc->mutex.sync_level = method_desc->method.sync_level; in acpi_ds_create_method_mutex() 270 method_desc->method.mutex = mutex_desc; in acpi_ds_create_method_mutex() 315 * If this method is serialized, we need to acquire the method mutex. in acpi_ds_begin_method_execution() 319 * Create a mutex for the method if it is defined to be Serialized in acpi_ds_begin_method_execution() 320 * and a mutex has not already been created. We defer the mutex creation in acpi_ds_begin_method_execution() [all …]
|
| /linux/drivers/net/ethernet/netronome/nfp/nfpcore/ |
| H A D | nfp_mutex.c | 69 * nfp_cpp_mutex_init() - Initialize a mutex location 73 * @key: Unique 32-bit value for this mutex 78 * This creates the initial mutex state, as locked by this 109 * nfp_cpp_mutex_alloc() - Create a mutex handle 128 struct nfp_cpp_mutex *mutex; in nfp_cpp_mutex_alloc() local 143 mutex = kzalloc(sizeof(*mutex), GFP_KERNEL); in nfp_cpp_mutex_alloc() 144 if (!mutex) in nfp_cpp_mutex_alloc() 147 mutex->cpp = cpp; in nfp_cpp_mutex_alloc() 148 mutex->target = target; in nfp_cpp_mutex_alloc() 149 mutex->address = address; in nfp_cpp_mutex_alloc() [all …]
|
| /linux/drivers/gpu/drm/amd/pm/ |
| H A D | amdgpu_dpm.c | 49 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_get_sclk() 52 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_get_sclk() 65 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_get_mclk() 68 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_get_mclk() 90 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_set_powergating_by_smu() 118 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_set_powergating_by_smu() 128 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_set_gfx_power_up_by_imu() 130 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_set_gfx_power_up_by_imu() 146 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_baco_enter() 151 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_baco_enter() [all …]
|
| /linux/include/linux/ |
| H A D | ww_mutex.h | 5 * Original mutex implementation started by Ingo Molnar: 20 #include <linux/mutex.h> 29 #define WW_MUTEX_BASE mutex 98 * ww_mutex_init - initialize the w/w mutex 99 * @lock: the mutex to be initialized 100 * @ww_class: the w/w class the mutex should belong to 102 * Initialize the w/w mutex to unlocked state and associate it with the given 103 * class. Static define macro for w/w mutex is not provided and this function 104 * is the only way to properly initialize the w/w mutex. 106 * It is not allowed to initialize an already locked mutex. [all …]
|
| /linux/drivers/soc/mediatek/ |
| H A D | mtk-mutex.c | 13 #include <linux/soc/mediatek/mtk-mutex.h> 39 * mutex ID bit accordingly. 41 #define DISP_REG_MUTEX_MOD(mutex, id, n) ({ \ argument 42 const typeof(mutex) _mutex = (mutex); \ 365 struct mtk_mutex mutex[MTK_MUTEX_MAX_HANDLES]; member 705 * So that MUTEX can not only send a STREAM_DONE event to GCE 854 if (!mtx->mutex[i].claimed) { in mtk_mutex_get() 855 mtx->mutex[i].claimed = true; in mtk_mutex_get() 856 return &mtx->mutex[i]; in mtk_mutex_get() 863 void mtk_mutex_put(struct mtk_mutex *mutex) in mtk_mutex_put() argument [all …]
|
| /linux/Documentation/locking/ |
| H A D | mutex-design.rst | 2 Generic Mutex Subsystem 26 Mutexes are represented by 'struct mutex', defined in include/linux/mutex.h 27 and implemented in kernel/locking/mutex.c. These locks use an atomic variable 37 When acquiring a mutex, there are three possible paths that can be 49 soon. The mutex spinners are queued up using MCS lock so that only 50 one spinner can compete for the mutex. 61 waiting to spin on mutex owner, only to go directly to slowpath upon 78 The mutex subsystem checks and enforces the following rules: 80 - Only one task can hold the mutex at a time. 81 - Only the owner can unlock the mutex. [all …]
|
| H A D | rt-mutex-design.rst | 2 RT-mutex implementation design 12 Documentation/locking/rt-mutex.rst. Although this document does explain problems 27 to use a resource that a lower priority process has (a mutex for example), 85 mutex 88 the PI locks will be called a mutex. 103 a process being blocked on the mutex, it is fine to allocate 105 structure holds a pointer to the task, as well as the mutex that 107 place the task in the waiters rbtree of a mutex as well as the 108 pi_waiters rbtree of a mutex owner task (described below). 111 on a mutex. This is the same as waiter->task. [all …]
|
| H A D | futex-requeue-pi.rst | 8 boosting logic [see rt-mutex-design.rst] For the purposes of 21 rest to the natural wakeup inherent in unlocking the mutex 26 /* caller must lock mutex */ 27 pthread_cond_wait(cond, mutex) 30 unlock(mutex); 37 lock(mutex); 44 futex_requeue(cond->data.__futex, cond->mutex); 47 Once pthread_cond_broadcast() requeues the tasks, the cond->mutex 49 mutex only after it has returned to user space. This will leave the 60 /* caller must lock mutex */ [all …]
|
| /linux/drivers/media/i2c/ |
| H A D | tw9900.c | 83 struct mutex mutex; member 193 mutex_lock(&tw9900->mutex); in tw9900_get_fmt() 195 mutex_unlock(&tw9900->mutex); in tw9900_get_fmt() 207 mutex_lock(&tw9900->mutex); in tw9900_set_fmt() 210 mutex_unlock(&tw9900->mutex); in tw9900_set_fmt() 216 mutex_unlock(&tw9900->mutex); in tw9900_set_fmt() 241 /* v4l2_ctrl_lock() locks tw9900->mutex. */ in tw9900_s_ctrl() 265 mutex_lock(&tw9900->mutex); in tw9900_s_stream() 268 mutex_unlock(&tw9900->mutex); in tw9900_s_stream() 272 mutex_unlock(&tw9900->mutex); in tw9900_s_stream() [all …]
|
| /linux/Documentation/translations/zh_CN/locking/ |
| H A D | mutex-design.rst | 4 :Original: Documentation/locking/mutex-design.rst 25 在Linux内核中,互斥锁(mutex)指的是一个特殊的加锁原语,它在共享内存系统上 36 互斥锁由“struct mutex”表示,在include/linux/mutex.h中定义,并在 37 kernel/locking/mutex.c中实现。这些锁使用一个原子变量(->owner)来跟踪 107 mutex_init(mutex); 111 void mutex_lock(struct mutex *lock); 112 void mutex_lock_nested(struct mutex *lock, unsigned int subclass); 113 int mutex_trylock(struct mutex *lock); 117 int mutex_lock_interruptible_nested(struct mutex *lock, 119 int mutex_lock_interruptible(struct mutex *lock); [all …]
|
| /linux/drivers/net/wireless/realtek/rtw88/ |
| H A D | mac80211.c | 58 mutex_lock(&rtwdev->mutex); in rtw_ops_start() 60 mutex_unlock(&rtwdev->mutex); in rtw_ops_start() 69 mutex_lock(&rtwdev->mutex); in rtw_ops_stop() 71 mutex_unlock(&rtwdev->mutex); in rtw_ops_stop() 82 mutex_lock(&rtwdev->mutex); in rtw_ops_config() 104 mutex_unlock(&rtwdev->mutex); in rtw_ops_config() 168 mutex_lock(&rtwdev->mutex); in rtw_ops_add_interface() 172 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface() 178 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface() 207 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface() [all …]
|
| /linux/include/linux/soc/mediatek/ |
| H A D | mtk-mutex.h | 71 int mtk_mutex_prepare(struct mtk_mutex *mutex); 72 void mtk_mutex_add_comp(struct mtk_mutex *mutex, 74 void mtk_mutex_enable(struct mtk_mutex *mutex); 75 int mtk_mutex_enable_by_cmdq(struct mtk_mutex *mutex, 77 void mtk_mutex_disable(struct mtk_mutex *mutex); 78 void mtk_mutex_remove_comp(struct mtk_mutex *mutex, 80 void mtk_mutex_unprepare(struct mtk_mutex *mutex); 81 void mtk_mutex_put(struct mtk_mutex *mutex); 82 void mtk_mutex_acquire(struct mtk_mutex *mutex); 83 void mtk_mutex_release(struct mtk_mutex *mutex); [all …]
|
| /linux/drivers/vhost/ |
| H A D | test.c | 13 #include <linux/mutex.h> 57 mutex_lock(&vq->mutex); in handle_vq() 60 mutex_unlock(&vq->mutex); in handle_vq() 99 mutex_unlock(&vq->mutex); in handle_vq() 141 mutex_lock(&vq->mutex); in vhost_test_stop_vq() 144 mutex_unlock(&vq->mutex); in vhost_test_stop_vq() 181 mutex_lock(&n->dev.mutex); in vhost_test_run() 196 mutex_lock(&vq->mutex); in vhost_test_run() 205 mutex_unlock(&vq->mutex); in vhost_test_run() 215 mutex_unlock(&n->dev.mutex); in vhost_test_run() [all …]
|
| /linux/Documentation/devicetree/bindings/hwlock/ |
| H A D | qcom-hwspinlock.yaml | 7 title: Qualcomm Hardware Mutex Block 20 - qcom,sfpb-mutex 21 - qcom,tcsr-mutex 24 - qcom,apq8084-tcsr-mutex 25 - qcom,ipq6018-tcsr-mutex 26 - qcom,msm8226-tcsr-mutex 27 - qcom,msm8994-tcsr-mutex 28 - const: qcom,tcsr-mutex 31 - qcom,msm8974-tcsr-mutex 32 - const: qcom,tcsr-mutex [all …]
|
| /linux/drivers/media/dvb-core/ |
| H A D | dmxdev.c | 125 if (mutex_lock_interruptible(&dmxdev->mutex)) in dvb_dvr_open() 129 mutex_unlock(&dmxdev->mutex); in dvb_dvr_open() 153 mutex_unlock(&dmxdev->mutex); in dvb_dvr_open() 163 mutex_unlock(&dmxdev->mutex); in dvb_dvr_open() 168 mutex_unlock(&dmxdev->mutex); in dvb_dvr_open() 182 mutex_unlock(&dmxdev->mutex); in dvb_dvr_open() 189 mutex_unlock(&dmxdev->mutex); in dvb_dvr_open() 196 mutex_unlock(&dmxdev->mutex); in dvb_dvr_open() 205 mutex_lock(&dmxdev->mutex); in dvb_dvr_release() 234 mutex_unlock(&dmxdev->mutex); in dvb_dvr_release() [all...] |
| /linux/fs/kernfs/ |
| H A D | file.c | 43 static inline struct mutex *kernfs_open_file_mutex_ptr(struct kernfs_node *kn) in kernfs_open_file_mutex_ptr() 50 static inline struct mutex *kernfs_open_file_mutex_lock(struct kernfs_node *kn) in kernfs_open_file_mutex_lock() 52 struct mutex *lock; in kernfs_open_file_mutex_lock() 100 * the caller guarantees that this mutex is being held, other updaters can't 169 * @of->mutex nests outside active ref and is primarily to ensure that in kernfs_seq_start() 172 mutex_lock(&of->mutex); in kernfs_seq_start() 214 mutex_unlock(&of->mutex); in kernfs_seq_stop() 255 * @of->mutex nests outside active ref and is used both to ensure that in kernfs_file_read_iter() 258 mutex_lock(&of->mutex); in kernfs_file_read_iter() 261 mutex_unlock(&of->mutex); in kernfs_file_read_iter() [all …]
|
| /linux/tools/perf/util/ |
| H A D | mutex.h | 24 /* Documents if a shared field or global variable needs to be protected by a mutex. */ 29 * a mutex when dereferencing the pointer. 61 /* Documents a function that expects a mutex to be held prior to entry. */ 88 * A wrapper around the mutex implementation that allows perf to error check 91 struct LOCKABLE mutex { struct 101 void mutex_init(struct mutex *mtx); 106 void mutex_init_pshared(struct mutex *mtx); 107 /* Initializes a mutex that may be recursively held on the same thread. */ 108 void mutex_init_recursive(struct mutex *mtx); 109 void mutex_destroy(struct mutex *mtx); [all …]
|
| /linux/drivers/mtd/chips/ |
| H A D | cfi_cmdset_0020.c | 268 mutex_lock(&chip->mutex); in do_read_onechip() 300 mutex_unlock(&chip->mutex); in do_read_onechip() 306 mutex_unlock(&chip->mutex); in do_read_onechip() 308 mutex_lock(&chip->mutex); in do_read_onechip() 339 mutex_unlock(&chip->mutex); in do_read_onechip() 345 mutex_unlock(&chip->mutex); in do_read_onechip() 355 mutex_unlock(&chip->mutex); in do_read_onechip() 380 mutex_unlock(&chip->mutex); in do_read_onechip() 447 mutex_lock(&chip->mutex); in do_write_buffer() 472 mutex_unlock(&chip->mutex); in do_write_buffer() [all …]
|
| /linux/drivers/cpufreq/ |
| H A D | cpufreq_userspace.c | 15 #include <linux/mutex.h> 21 struct mutex mutex; member 38 mutex_lock(&userspace->mutex); in cpufreq_set() 46 mutex_unlock(&userspace->mutex); in cpufreq_set() 63 mutex_init(&userspace->mutex); in cpufreq_userspace_policy_init() 86 mutex_lock(&userspace->mutex); in cpufreq_userspace_policy_start() 89 mutex_unlock(&userspace->mutex); in cpufreq_userspace_policy_start() 99 mutex_lock(&userspace->mutex); in cpufreq_userspace_policy_stop() 102 mutex_unlock(&userspace->mutex); in cpufreq_userspace_policy_stop() 109 mutex_lock(&userspace->mutex); in cpufreq_userspace_policy_limits() [all …]
|
| /linux/drivers/media/cec/i2c/ |
| H A D | ch7322.c | 21 #include <linux/mutex.h> 154 struct mutex mutex; /* device access mutex */ member 172 WARN_ON(!mutex_is_locked(&ch7322->mutex)); in ch7322_send_message() 214 WARN_ON(!mutex_is_locked(&ch7322->mutex)); in ch7322_receive_message() 243 mutex_lock(&ch7322->mutex); in ch7322_tx_done() 246 mutex_unlock(&ch7322->mutex); in ch7322_tx_done() 275 mutex_lock(&ch7322->mutex); in ch7322_rx_done() 277 mutex_unlock(&ch7322->mutex); in ch7322_rx_done() 295 mutex_lock(&ch7322->mutex); in ch7322_phys_addr() 298 mutex_unlock(&ch7322->mutex); in ch7322_phys_addr() [all …]
|
| /linux/net/ceph/ |
| H A D | auth.c | 66 mutex_init(&ac->mutex); in ceph_auth_init() 94 mutex_lock(&ac->mutex); in ceph_auth_reset() 99 mutex_unlock(&ac->mutex); in ceph_auth_reset() 128 mutex_lock(&ac->mutex); in ceph_auth_build_hello() 156 mutex_unlock(&ac->mutex); in ceph_auth_build_hello() 213 mutex_lock(&ac->mutex); in ceph_handle_auth_reply() 275 mutex_unlock(&ac->mutex); in ceph_handle_auth_reply() 289 mutex_lock(&ac->mutex); in ceph_build_auth() 292 mutex_unlock(&ac->mutex); in ceph_build_auth() 300 mutex_lock(&ac->mutex); in ceph_auth_is_authenticated() [all …]
|
| /linux/drivers/gpu/drm/amd/display/modules/hdcp/ |
| H A D | hdcp_psp.c | 62 mutex_lock(&psp->dtm_context.mutex); in remove_display_from_topology_v2() 80 mutex_unlock(&psp->dtm_context.mutex); in remove_display_from_topology_v2() 98 mutex_lock(&psp->dtm_context.mutex); in remove_display_from_topology_v3() 108 mutex_unlock(&psp->dtm_context.mutex); in remove_display_from_topology_v3() 138 mutex_lock(&psp->dtm_context.mutex); in add_display_to_topology_v2() 165 mutex_unlock(&psp->dtm_context.mutex); in add_display_to_topology_v2() 185 mutex_lock(&psp->dtm_context.mutex); in add_display_to_topology_v3() 211 mutex_unlock(&psp->dtm_context.mutex); in add_display_to_topology_v3() 268 mutex_lock(&psp->hdcp_context.mutex); in mod_hdcp_hdcp1_create_session() 288 mutex_unlock(&psp->hdcp_context.mutex); in mod_hdcp_hdcp1_create_session() [all …]
|