Home
last modified time | relevance | path

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

12345678910>>...141

/linux-5.19.10/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-5.19.10/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-5.19.10/include/linux/
Dmutex.h63 struct mutex { struct
83 extern void mutex_destroy(struct mutex *lock); argument
89 static inline void mutex_destroy(struct mutex *lock) {} in mutex_destroy()
101 #define mutex_init(mutex) \ argument
105 __mutex_init((mutex), #mutex, &__key); \
116 struct mutex mutexname = __MUTEX_INITIALIZER(mutexname)
118 extern void __mutex_init(struct mutex *lock, const char *name,
127 extern bool mutex_is_locked(struct mutex *lock);
135 struct mutex { struct
149 struct mutex mutexname = __MUTEX_INITIALIZER(mutexname) argument
[all …]
/linux-5.19.10/drivers/gpu/drm/amd/pm/
Damdgpu_dpm.c47 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_get_sclk()
50 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_get_sclk()
63 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_get_mclk()
66 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_get_mclk()
83 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_set_powergating_by_smu()
105 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_set_powergating_by_smu()
119 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_baco_enter()
124 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_baco_enter()
138 mutex_lock(&adev->pm.mutex); in amdgpu_dpm_baco_exit()
143 mutex_unlock(&adev->pm.mutex); in amdgpu_dpm_baco_exit()
[all …]
/linux-5.19.10/drivers/soc/mediatek/
Dmtk-mutex.c195 struct mtk_mutex mutex[10]; member
432 if (!mtx->mutex[i].claimed) { in mtk_mutex_get()
433 mtx->mutex[i].claimed = true; in mtk_mutex_get()
434 return &mtx->mutex[i]; in mtk_mutex_get()
441 void mtk_mutex_put(struct mtk_mutex *mutex) in mtk_mutex_put() argument
443 struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx, in mtk_mutex_put()
444 mutex[mutex->id]); in mtk_mutex_put()
446 WARN_ON(&mtx->mutex[mutex->id] != mutex); in mtk_mutex_put()
448 mutex->claimed = false; in mtk_mutex_put()
452 int mtk_mutex_prepare(struct mtk_mutex *mutex) in mtk_mutex_prepare() argument
[all …]
/linux-5.19.10/include/linux/soc/mediatek/
Dmtk-mutex.h14 int mtk_mutex_prepare(struct mtk_mutex *mutex);
15 void mtk_mutex_add_comp(struct mtk_mutex *mutex,
17 void mtk_mutex_enable(struct mtk_mutex *mutex);
18 void mtk_mutex_disable(struct mtk_mutex *mutex);
19 void mtk_mutex_remove_comp(struct mtk_mutex *mutex,
21 void mtk_mutex_unprepare(struct mtk_mutex *mutex);
22 void mtk_mutex_put(struct mtk_mutex *mutex);
23 void mtk_mutex_acquire(struct mtk_mutex *mutex);
24 void mtk_mutex_release(struct mtk_mutex *mutex);
/linux-5.19.10/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-5.19.10/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-5.19.10/Documentation/devicetree/bindings/display/mediatek/
Dmediatek,mutex.yaml4 $id: http://devicetree.org/schemas/display/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,mt8167-disp-mutex
30 - mediatek,mt8173-disp-mutex
31 - mediatek,mt8183-disp-mutex
32 - mediatek,mt8186-disp-mutex
[all …]
/linux-5.19.10/drivers/net/wireless/realtek/rtw89/
Dmac80211.c49 mutex_lock(&rtwdev->mutex); in rtw89_ops_start()
51 mutex_unlock(&rtwdev->mutex); in rtw89_ops_start()
60 mutex_lock(&rtwdev->mutex); in rtw89_ops_stop()
62 mutex_unlock(&rtwdev->mutex); in rtw89_ops_stop()
72 mutex_lock(&rtwdev->mutex); in rtw89_ops_config()
95 mutex_unlock(&rtwdev->mutex); in rtw89_ops_config()
107 mutex_lock(&rtwdev->mutex); in rtw89_ops_add_interface()
138 mutex_unlock(&rtwdev->mutex); in rtw89_ops_add_interface()
151 mutex_lock(&rtwdev->mutex); in rtw89_ops_remove_interface()
157 mutex_unlock(&rtwdev->mutex); in rtw89_ops_remove_interface()
[all …]
/linux-5.19.10/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-5.19.10/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-5.19.10/drivers/gpu/drm/i915/
Dintel_wakeref.h38 struct mutex mutex; member
49 struct lock_class_key mutex; member
129 might_lock(&wf->mutex); in intel_wakeref_might_get()
182 might_lock(&wf->mutex); in intel_wakeref_might_put()
195 __acquires(wf->mutex) in intel_wakeref_lock()
197 mutex_lock(&wf->mutex); in intel_wakeref_lock()
208 __releases(wf->mutex) in intel_wakeref_unlock()
210 mutex_unlock(&wf->mutex); in intel_wakeref_unlock()
223 mutex_lock(&wf->mutex); in intel_wakeref_unlock_wait()
224 mutex_unlock(&wf->mutex); in intel_wakeref_unlock_wait()
[all …]
/linux-5.19.10/drivers/media/usb/uvc/
Duvc_queue.c226 queue->queue.lock = &queue->mutex; in uvc_queue_init()
242 mutex_init(&queue->mutex); in uvc_queue_init()
252 mutex_lock(&queue->mutex); in uvc_queue_release()
254 mutex_unlock(&queue->mutex); in uvc_queue_release()
266 mutex_lock(&queue->mutex); in uvc_request_buffers()
268 mutex_unlock(&queue->mutex); in uvc_request_buffers()
277 mutex_lock(&queue->mutex); in uvc_query_buffer()
279 mutex_unlock(&queue->mutex); in uvc_query_buffer()
289 mutex_lock(&queue->mutex); in uvc_create_buffers()
291 mutex_unlock(&queue->mutex); in uvc_create_buffers()
[all …]
/linux-5.19.10/drivers/mtd/chips/
Dcfi_cmdset_0020.c267 mutex_lock(&chip->mutex); in do_read_onechip()
299 mutex_unlock(&chip->mutex); in do_read_onechip()
305 mutex_unlock(&chip->mutex); in do_read_onechip()
307 mutex_lock(&chip->mutex); in do_read_onechip()
338 mutex_unlock(&chip->mutex); in do_read_onechip()
344 mutex_unlock(&chip->mutex); in do_read_onechip()
354 mutex_unlock(&chip->mutex); in do_read_onechip()
379 mutex_unlock(&chip->mutex); in do_read_onechip()
446 mutex_lock(&chip->mutex); in do_write_buffer()
471 mutex_unlock(&chip->mutex); in do_write_buffer()
[all …]
/linux-5.19.10/drivers/net/wireless/realtek/rtw88/
Dmac80211.c54 mutex_lock(&rtwdev->mutex); in rtw_ops_start()
56 mutex_unlock(&rtwdev->mutex); in rtw_ops_start()
65 mutex_lock(&rtwdev->mutex); in rtw_ops_stop()
67 mutex_unlock(&rtwdev->mutex); in rtw_ops_stop()
78 mutex_lock(&rtwdev->mutex); in rtw_ops_config()
108 mutex_unlock(&rtwdev->mutex); in rtw_ops_config()
174 mutex_lock(&rtwdev->mutex); in rtw_ops_add_interface()
197 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
209 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
224 mutex_lock(&rtwdev->mutex); in rtw_ops_remove_interface()
[all …]
/linux-5.19.10/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-5.19.10/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-5.19.10/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-5.19.10/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 …]
/linux-5.19.10/sound/aoa/codecs/
Donyx.c60 struct mutex mutex; member
124 mutex_lock(&onyx->mutex); in onyx_snd_vol_get()
127 mutex_unlock(&onyx->mutex); in onyx_snd_vol_get()
148 mutex_lock(&onyx->mutex); in onyx_snd_vol_put()
154 mutex_unlock(&onyx->mutex); in onyx_snd_vol_put()
164 mutex_unlock(&onyx->mutex); in onyx_snd_vol_put()
200 mutex_lock(&onyx->mutex); in onyx_snd_inputgain_get()
202 mutex_unlock(&onyx->mutex); in onyx_snd_inputgain_get()
219 mutex_lock(&onyx->mutex); in onyx_snd_inputgain_put()
226 mutex_unlock(&onyx->mutex); in onyx_snd_inputgain_put()
[all …]
/linux-5.19.10/drivers/leds/trigger/
Dledtrig-tty.c13 struct mutex mutex; member
30 mutex_lock(&trigger_data->mutex); in ttyname_show()
35 mutex_unlock(&trigger_data->mutex); in ttyname_show()
60 mutex_lock(&trigger_data->mutex); in ttyname_store()
70 mutex_unlock(&trigger_data->mutex); in ttyname_store()
86 mutex_lock(&trigger_data->mutex); in ledtrig_tty_work()
90 mutex_unlock(&trigger_data->mutex); in ledtrig_tty_work()
119 mutex_unlock(&trigger_data->mutex); in ledtrig_tty_work()
134 mutex_unlock(&trigger_data->mutex); in ledtrig_tty_work()
156 mutex_init(&trigger_data->mutex); in ledtrig_tty_activate()
/linux-5.19.10/drivers/gpu/drm/i915/selftests/
Di915_gem_evict.c120 mutex_lock(&ggtt->vm.mutex); in igt_evict_something()
125 mutex_unlock(&ggtt->vm.mutex); in igt_evict_something()
135 mutex_lock(&ggtt->vm.mutex); in igt_evict_something()
140 mutex_unlock(&ggtt->vm.mutex); in igt_evict_something()
207 mutex_lock(&ggtt->vm.mutex); in igt_evict_for_vma()
209 mutex_unlock(&ggtt->vm.mutex); in igt_evict_for_vma()
219 mutex_lock(&ggtt->vm.mutex); in igt_evict_for_vma()
221 mutex_unlock(&ggtt->vm.mutex); in igt_evict_for_vma()
300 mutex_lock(&ggtt->vm.mutex); in igt_evict_for_cache_color()
302 mutex_unlock(&ggtt->vm.mutex); in igt_evict_for_cache_color()
[all …]
/linux-5.19.10/drivers/net/wireless/zydas/zd1211rw/
Dzd_chip.c27 mutex_init(&chip->mutex); in zd_chip_init()
34 ZD_ASSERT(!mutex_is_locked(&chip->mutex)); in zd_chip_clear()
37 mutex_destroy(&chip->mutex); in zd_chip_clear()
141 ZD_ASSERT(mutex_is_locked(&chip->mutex)); in _zd_iowrite32v_async_locked()
190 ZD_ASSERT(mutex_is_locked(&chip->mutex)); in zd_iowrite16a_locked()
259 mutex_lock(&chip->mutex); in zd_ioread16()
261 mutex_unlock(&chip->mutex); in zd_ioread16()
269 mutex_lock(&chip->mutex); in zd_ioread32()
271 mutex_unlock(&chip->mutex); in zd_ioread32()
279 mutex_lock(&chip->mutex); in zd_iowrite16()
[all …]

12345678910>>...141