Home
last modified time | relevance | path

Searched refs:ww_ctx (Results 1 – 10 of 10) sorted by relevance

/linux-6.6.21/kernel/locking/
Dww_mutex.h181 ww_mutex_lock_acquired(struct ww_mutex *ww, struct ww_acquire_ctx *ww_ctx) in ww_mutex_lock_acquired() argument
195 DEBUG_LOCKS_WARN_ON(ww_ctx->done_acquire); in ww_mutex_lock_acquired()
197 if (ww_ctx->contending_lock) { in ww_mutex_lock_acquired()
202 DEBUG_LOCKS_WARN_ON(ww_ctx->contending_lock != ww); in ww_mutex_lock_acquired()
208 DEBUG_LOCKS_WARN_ON(ww_ctx->acquired > 0); in ww_mutex_lock_acquired()
209 ww_ctx->contending_lock = NULL; in ww_mutex_lock_acquired()
215 DEBUG_LOCKS_WARN_ON(ww_ctx->ww_class != ww->ww_class); in ww_mutex_lock_acquired()
217 ww_ctx->acquired++; in ww_mutex_lock_acquired()
218 ww->ctx = ww_ctx; in ww_mutex_lock_acquired()
278 struct ww_acquire_ctx *ww_ctx) in __ww_mutex_die() argument
[all …]
Dww_rt_mutex.c12 int ww_mutex_trylock(struct ww_mutex *lock, struct ww_acquire_ctx *ww_ctx) in ww_mutex_trylock() argument
16 if (!ww_ctx) in ww_mutex_trylock()
24 if (ww_ctx->acquired == 0) in ww_mutex_trylock()
25 ww_ctx->wounded = 0; in ww_mutex_trylock()
28 ww_mutex_set_context_fastpath(lock, ww_ctx); in ww_mutex_trylock()
29 mutex_acquire_nest(&rtm->dep_map, 0, 1, &ww_ctx->dep_map, _RET_IP_); in ww_mutex_trylock()
38 __ww_rt_mutex_lock(struct ww_mutex *lock, struct ww_acquire_ctx *ww_ctx, in __ww_rt_mutex_lock() argument
47 if (ww_ctx) { in __ww_rt_mutex_lock()
48 if (unlikely(ww_ctx == READ_ONCE(lock->ctx))) in __ww_rt_mutex_lock()
56 if (ww_ctx->acquired == 0) in __ww_rt_mutex_lock()
[all …]
Dmutex.c304 bool ww_mutex_spin_on_owner(struct mutex *lock, struct ww_acquire_ctx *ww_ctx, in ww_mutex_spin_on_owner() argument
322 if (ww_ctx->acquired > 0 && READ_ONCE(ww->ctx)) in ww_mutex_spin_on_owner()
353 struct ww_acquire_ctx *ww_ctx, struct mutex_waiter *waiter) in mutex_spin_on_owner() argument
378 if (ww_ctx && !ww_mutex_spin_on_owner(lock, ww_ctx, waiter)) { in mutex_spin_on_owner()
441 mutex_optimistic_spin(struct mutex *lock, struct ww_acquire_ctx *ww_ctx, in mutex_optimistic_spin() argument
476 if (!mutex_spin_on_owner(lock, owner, ww_ctx, waiter)) in mutex_optimistic_spin()
517 mutex_optimistic_spin(struct mutex *lock, struct ww_acquire_ctx *ww_ctx, in mutex_optimistic_spin() argument
571 struct ww_acquire_ctx *ww_ctx, const bool use_ww_ctx) in __mutex_lock_common() argument
578 ww_ctx = NULL; in __mutex_lock_common()
585 if (ww_ctx) { in __mutex_lock_common()
[all …]
Drtmutex.c37 struct ww_acquire_ctx *ww_ctx) in __ww_mutex_add_waiter() argument
43 struct ww_acquire_ctx *ww_ctx) in __ww_mutex_check_waiters() argument
48 struct ww_acquire_ctx *ww_ctx) in ww_mutex_lock_acquired() argument
54 struct ww_acquire_ctx *ww_ctx) in __ww_mutex_check_kill() argument
445 if (aw->ww_ctx) { in __waiter_less()
446 if (!bw->ww_ctx) in __waiter_less()
449 return (signed long)(aw->ww_ctx->stamp - in __waiter_less()
450 bw->ww_ctx->stamp) < 0; in __waiter_less()
769 if (IS_ENABLED(CONFIG_PREEMPT_RT) && waiter->ww_ctx && detect_deadlock) in rt_mutex_adjust_prio_chain()
849 if (IS_ENABLED(CONFIG_PREEMPT_RT) && orig_waiter && orig_waiter->ww_ctx) in rt_mutex_adjust_prio_chain()
[all …]
Dmutex.h17 struct ww_acquire_ctx *ww_ctx; member
Dmutex-debug.c33 waiter->ww_ctx = MUTEX_POISON_WW_CTX; in debug_mutex_lock_common()
Drtmutex_common.h58 struct ww_acquire_ctx *ww_ctx; member
/linux-6.6.21/drivers/gpu/drm/
Ddrm_modeset_lock.c169 ww_acquire_done(&ctx->ww_ctx); in drm_modeset_lock_all()
250 ww_acquire_init(&ctx->ww_ctx, &crtc_ww_class); in drm_modeset_acquire_init()
264 ww_acquire_fini(&ctx->ww_ctx); in drm_modeset_acquire_fini()
300 lockdep_assert_held(&ctx->ww_ctx); 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()
/linux-6.6.21/drivers/regulator/
Dcore.c142 struct ww_acquire_ctx *ww_ctx) in regulator_lock_nested() argument
149 if (!ww_mutex_trylock(&rdev->mutex, ww_ctx)) { in regulator_lock_nested()
157 ret = ww_mutex_lock(&rdev->mutex, ww_ctx); in regulator_lock_nested()
220 struct ww_acquire_ctx *ww_ctx) in regulator_lock_two() argument
225 ww_acquire_init(ww_ctx, &regulator_ww_class); in regulator_lock_two()
228 ret = regulator_lock_nested(rdev1, ww_ctx); in regulator_lock_two()
230 ret = regulator_lock_nested(rdev2, ww_ctx); in regulator_lock_two()
241 ww_mutex_lock_slow(&contended->mutex, ww_ctx); in regulator_lock_two()
245 ret = regulator_lock_nested(contended, ww_ctx); in regulator_lock_two()
254 ww_acquire_done(ww_ctx); in regulator_lock_two()
[all …]
/linux-6.6.21/include/drm/
Ddrm_modeset_lock.h48 struct ww_acquire_ctx ww_ctx; member