Home
last modified time | relevance | path

Searched refs:mutex (Results 1 – 25 of 3823) sorted by relevance

12345678910>>...153

/linux-6.6.21/drivers/acpi/acpica/
Dexmutex.c37 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()
58 (obj_desc->mutex.prev)->mutex.original_sync_level = in acpi_ex_unlink_mutex()
59 obj_desc->mutex.original_sync_level; in acpi_ex_unlink_mutex()
61 thread->acquired_mutex_list = obj_desc->mutex.next; in acpi_ex_unlink_mutex()
88 obj_desc->mutex.prev = NULL; in acpi_ex_link_mutex()
89 obj_desc->mutex.next = list_head; in acpi_ex_link_mutex()
[all …]
Ddsmethod.c263 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()
323 if (!obj_desc->method.mutex) { in acpi_ds_begin_method_execution()
345 obj_desc->method.mutex->mutex.sync_level)) { in acpi_ds_begin_method_execution()
360 !obj_desc->method.mutex->mutex.thread_id || in acpi_ds_begin_method_execution()
362 obj_desc->method.mutex->mutex.thread_id)) { in acpi_ds_begin_method_execution()
368 acpi_ex_system_wait_mutex(obj_desc->method.mutex-> in acpi_ds_begin_method_execution()
369 mutex.os_mutex, in acpi_ds_begin_method_execution()
378 obj_desc->method.mutex->mutex. in acpi_ds_begin_method_execution()
[all …]
/linux-6.6.21/drivers/net/ethernet/netronome/nfp/nfpcore/
Dnfp_mutex.c128 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()
150 mutex->key = key; in nfp_cpp_mutex_alloc()
151 mutex->depth = 0; in nfp_cpp_mutex_alloc()
153 return mutex; in nfp_cpp_mutex_alloc()
160 void nfp_cpp_mutex_free(struct nfp_cpp_mutex *mutex) in nfp_cpp_mutex_free() argument
[all …]
/linux-6.6.21/include/linux/
Dmutex.h64 struct mutex { struct
84 extern void mutex_destroy(struct mutex *lock); argument
90 static inline void mutex_destroy(struct mutex *lock) {} in mutex_destroy()
102 #define mutex_init(mutex) \ argument
106 __mutex_init((mutex), #mutex, &__key); \
117 struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
119 extern void __mutex_init(struct mutex *lock, const char *name,
128 extern bool mutex_is_locked(struct mutex *lock);
136 struct mutex { struct
150 struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) argument
[all …]
/linux-6.6.21/drivers/gpu/drm/amd/pm/
Damdgpu_dpm.c49 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()
85 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_set_powergating_by_smu()
107 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_set_powergating_by_smu()
117 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_set_gfx_power_up_by_imu()
119 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_set_gfx_power_up_by_imu()
135 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_baco_enter()
140 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_baco_enter()
[all …]
/linux-6.6.21/drivers/soc/mediatek/
Dmtk-mutex.c316 struct mtk_mutex mutex[MTK_MUTEX_MAX_HANDLES]; member
722 if (!mtx->mutex[i].claimed) { in mtk_mutex_get()
723 mtx->mutex[i].claimed = true; in mtk_mutex_get()
724 return &mtx->mutex[i]; in mtk_mutex_get()
731 void mtk_mutex_put(struct mtk_mutex *mutex) in mtk_mutex_put() argument
733 struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx, in mtk_mutex_put()
734 mutex[mutex->id]); in mtk_mutex_put()
736 WARN_ON(&mtx->mutex[mutex->id] != mutex); in mtk_mutex_put()
738 mutex->claimed = false; in mtk_mutex_put()
742 int mtk_mutex_prepare(struct mtk_mutex *mutex) in mtk_mutex_prepare() argument
[all …]
/linux-6.6.21/Documentation/devicetree/bindings/soc/mediatek/
Dmediatek,mutex.yaml4 $id: http://devicetree.org/schemas/soc/mediatek/mediatek,mutex.yaml#
7 title: Mediatek mutex
14 Mediatek mutex, namely MUTEX, is used to send the triggers signals called
17 In some SoC, such as mt2701, MUTEX could be a hardware mutex which protects
27 - mediatek,mt2701-disp-mutex
28 - mediatek,mt2712-disp-mutex
29 - mediatek,mt6795-disp-mutex
30 - mediatek,mt8167-disp-mutex
31 - mediatek,mt8173-disp-mutex
32 - mediatek,mt8183-disp-mutex
[all …]
/linux-6.6.21/Documentation/translations/zh_CN/locking/
Dmutex-design.rst4 :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-6.6.21/include/linux/soc/mediatek/
Dmtk-mutex.h71 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-6.6.21/kernel/locking/
Dmutex.c46 __mutex_init(struct mutex *lock, const char *name, struct lock_class_key *key) in __mutex_init()
79 static inline struct task_struct *__mutex_owner(struct mutex *lock) in __mutex_owner()
89 bool mutex_is_locked(struct mutex *lock) in mutex_is_locked()
103 static inline struct task_struct *__mutex_trylock_common(struct mutex *lock, bool handoff) in __mutex_trylock_common()
142 static inline bool __mutex_trylock_or_handoff(struct mutex *lock, bool handoff) in __mutex_trylock_or_handoff()
150 static inline bool __mutex_trylock(struct mutex *lock) in __mutex_trylock()
166 static __always_inline bool __mutex_trylock_fast(struct mutex *lock) in __mutex_trylock_fast()
177 static __always_inline bool __mutex_unlock_fast(struct mutex *lock) in __mutex_unlock_fast()
185 static inline void __mutex_set_flag(struct mutex *lock, unsigned long flag) in __mutex_set_flag()
190 static inline void __mutex_clear_flag(struct mutex *lock, unsigned long flag) in __mutex_clear_flag()
[all …]
/linux-6.6.21/drivers/vhost/
Dtest.c51 mutex_lock(&vq->mutex); in handle_vq()
54 mutex_unlock(&vq->mutex); in handle_vq()
93 mutex_unlock(&vq->mutex); in handle_vq()
135 mutex_lock(&vq->mutex); in vhost_test_stop_vq()
138 mutex_unlock(&vq->mutex); in vhost_test_stop_vq()
175 mutex_lock(&n->dev.mutex); in vhost_test_run()
190 mutex_lock(&vq->mutex); in vhost_test_run()
199 mutex_unlock(&vq->mutex); in vhost_test_run()
209 mutex_unlock(&n->dev.mutex); in vhost_test_run()
213 mutex_unlock(&n->dev.mutex); in vhost_test_run()
[all …]
/linux-6.6.21/drivers/net/wireless/realtek/rtw89/
Dmac80211.c62 mutex_lock(&rtwdev->mutex); in rtw89_ops_start()
64 mutex_unlock(&rtwdev->mutex); in rtw89_ops_start()
73 mutex_lock(&rtwdev->mutex); in rtw89_ops_stop()
75 mutex_unlock(&rtwdev->mutex); in rtw89_ops_stop()
85 mutex_lock(&rtwdev->mutex); in rtw89_ops_config()
103 mutex_unlock(&rtwdev->mutex); in rtw89_ops_config()
118 mutex_lock(&rtwdev->mutex); in rtw89_ops_add_interface()
166 mutex_unlock(&rtwdev->mutex); in rtw89_ops_add_interface()
183 mutex_lock(&rtwdev->mutex); in rtw89_ops_remove_interface()
192 mutex_unlock(&rtwdev->mutex); in rtw89_ops_remove_interface()
[all …]
/linux-6.6.21/Documentation/devicetree/bindings/hwlock/
Dqcom-hwspinlock.yaml20 - 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
51 compatible = "qcom,tcsr-mutex";
/linux-6.6.21/drivers/net/wireless/realtek/rtw88/
Dmac80211.c58 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()
201 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
215 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
[all …]
/linux-6.6.21/Documentation/locking/
Dmutex-design.rst26 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.
84 - A mutex must only be initialized via the API (see below).
[all …]
/linux-6.6.21/drivers/gpu/drm/i915/
Dintel_wakeref.h38 struct mutex mutex; member
49 struct lock_class_key mutex; member
130 might_lock(&wf->mutex); in intel_wakeref_might_get()
181 might_lock(&wf->mutex); in intel_wakeref_might_put()
194 __acquires(wf->mutex) in intel_wakeref_lock()
196 mutex_lock(&wf->mutex); in intel_wakeref_lock()
207 __releases(wf->mutex) in intel_wakeref_unlock()
209 mutex_unlock(&wf->mutex); in intel_wakeref_unlock()
222 mutex_lock(&wf->mutex); in intel_wakeref_unlock_wait()
223 mutex_unlock(&wf->mutex); in intel_wakeref_unlock_wait()
[all …]
/linux-6.6.21/drivers/media/dvb-core/
Ddmxdev.c125 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-6.6.21/drivers/media/usb/uvc/
Duvc_queue.c227 queue->queue.lock = &queue->mutex; in uvc_queue_init()
243 mutex_init(&queue->mutex); in uvc_queue_init()
253 mutex_lock(&queue->mutex); in uvc_queue_release()
255 mutex_unlock(&queue->mutex); in uvc_queue_release()
267 mutex_lock(&queue->mutex); in uvc_request_buffers()
269 mutex_unlock(&queue->mutex); in uvc_request_buffers()
278 mutex_lock(&queue->mutex); in uvc_query_buffer()
280 mutex_unlock(&queue->mutex); in uvc_query_buffer()
290 mutex_lock(&queue->mutex); in uvc_create_buffers()
292 mutex_unlock(&queue->mutex); in uvc_create_buffers()
[all …]
/linux-6.6.21/drivers/mtd/chips/
Dcfi_cmdset_0020.c268 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-6.6.21/drivers/gpu/drm/mediatek/
Dmtk_disp_ovl_adaptor.c315 void mtk_ovl_adaptor_add_comp(struct device *dev, struct mtk_mutex *mutex) in mtk_ovl_adaptor_add_comp() argument
317 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MDP_RDMA0); in mtk_ovl_adaptor_add_comp()
318 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MDP_RDMA1); in mtk_ovl_adaptor_add_comp()
319 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MDP_RDMA2); in mtk_ovl_adaptor_add_comp()
320 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MDP_RDMA3); in mtk_ovl_adaptor_add_comp()
321 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MDP_RDMA4); in mtk_ovl_adaptor_add_comp()
322 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MDP_RDMA5); in mtk_ovl_adaptor_add_comp()
323 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MDP_RDMA6); in mtk_ovl_adaptor_add_comp()
324 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MDP_RDMA7); in mtk_ovl_adaptor_add_comp()
325 mtk_mutex_add_comp(mutex, DDP_COMPONENT_MERGE1); in mtk_ovl_adaptor_add_comp()
[all …]
/linux-6.6.21/net/ceph/
Dauth.c66 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-6.6.21/drivers/media/cec/i2c/
Dch7322.c154 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()
311 mutex_lock(&ch7322->mutex); in ch7322_irq()
[all …]
/linux-6.6.21/tools/perf/util/
Dmutex.h72 struct LOCKABLE mutex { struct
82 void mutex_init(struct mutex *mtx);
87 void mutex_init_pshared(struct mutex *mtx);
88 void mutex_destroy(struct mutex *mtx);
90 void mutex_lock(struct mutex *mtx) EXCLUSIVE_LOCK_FUNCTION(*mtx);
91 void mutex_unlock(struct mutex *mtx) UNLOCK_FUNCTION(*mtx);
93 bool mutex_trylock(struct mutex *mtx) EXCLUSIVE_TRYLOCK_FUNCTION(true, *mtx);
104 void cond_wait(struct cond *cnd, struct mutex *mtx) EXCLUSIVE_LOCKS_REQUIRED(mtx);
/linux-6.6.21/drivers/gpu/drm/
Ddrm_modeset_lock.c153 mutex_lock(&config->mutex); in drm_modeset_lock_all()
211 mutex_unlock(&dev->mode_config.mutex); in drm_modeset_unlock_all()
230 WARN_ON(!drm_modeset_is_locked(&crtc->mutex)); in drm_warn_on_modeset_not_all_locked()
233 WARN_ON(!mutex_is_locked(&dev->mode_config.mutex)); in drm_warn_on_modeset_not_all_locked()
302 if (!ww_mutex_trylock(&lock->mutex, NULL)) in modeset_lock()
307 ret = ww_mutex_lock_slow_interruptible(&lock->mutex, &ctx->ww_ctx); in modeset_lock()
309 ret = ww_mutex_lock_interruptible(&lock->mutex, &ctx->ww_ctx); in modeset_lock()
311 ww_mutex_lock_slow(&lock->mutex, &ctx->ww_ctx); in modeset_lock()
314 ret = ww_mutex_lock(&lock->mutex, &ctx->ww_ctx); in modeset_lock()
368 ww_mutex_init(&lock->mutex, &crtc_ww_class); in drm_modeset_lock_init()
[all …]
/linux-6.6.21/drivers/mtd/lpddr/
Dlpddr_cmds.c88 mutex_init(&chip->mutex); in lpddr_cmdset()
152 mutex_unlock(&chip->mutex); in wait_for_ready()
167 mutex_lock(&chip->mutex); in wait_for_ready()
174 mutex_unlock(&chip->mutex); in wait_for_ready()
177 mutex_lock(&chip->mutex); in wait_for_ready()
238 ret = mutex_trylock(&contender->mutex); in get_chip()
242 mutex_unlock(&chip->mutex); in get_chip()
244 mutex_lock(&chip->mutex); in get_chip()
247 mutex_unlock(&contender->mutex); in get_chip()
251 mutex_unlock(&contender->mutex); in get_chip()
[all …]

12345678910>>...153