/linux/drivers/soc/mediatek/ |
H A D | mtk-mutex.c | 810 struct mtk_mutex_ctx *mtx = dev_get_drvdata(dev); in mtk_mutex_get() local 814 if (!mtx->mutex[i].claimed) { in mtk_mutex_get() 815 mtx->mutex[i].claimed = true; in mtk_mutex_get() 816 return &mtx->mutex[i]; in mtk_mutex_get() 825 struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx, in mtk_mutex_put() local 828 WARN_ON(&mtx->mutex[mutex->id] != mutex); in mtk_mutex_put() 836 struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx, in mtk_mutex_prepare() local 838 return clk_prepare_enable(mtx->clk); in mtk_mutex_prepare() 844 struct mtk_mutex_ctx *mtx = container_of(mutex, struct mtk_mutex_ctx, in mtk_mutex_unprepare() local 846 clk_disable_unprepare(mtx->clk); in mtk_mutex_unprepare() [all …]
|
/linux/tools/perf/util/ |
H A D | mutex.c | 20 static void __mutex_init(struct mutex *mtx, bool pshared) in __mutex_init() argument 33 CHECK_ERR(pthread_mutex_init(&mtx->lock, &attr)); in __mutex_init() 37 void mutex_init(struct mutex *mtx) in mutex_init() argument 39 __mutex_init(mtx, /*pshared=*/false); in mutex_init() 42 void mutex_init_pshared(struct mutex *mtx) in mutex_init_pshared() argument 44 __mutex_init(mtx, /*pshared=*/true); in mutex_init_pshared() 47 void mutex_destroy(struct mutex *mtx) in mutex_destroy() argument 49 CHECK_ERR(pthread_mutex_destroy(&mtx->lock)); in mutex_destroy() 52 void mutex_lock(struct mutex *mtx) in mutex_lock() argument 55 CHECK_ERR(pthread_mutex_lock(&mtx->lock)); in mutex_lock() [all …]
|
H A D | mutex.h | 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);
|
H A D | rwsem.c | 12 mutex_init(&sem->mtx); in init_rwsem() 22 mutex_destroy(&sem->mtx); in exit_rwsem() 32 mutex_lock(&sem->mtx); in down_read() 42 mutex_unlock(&sem->mtx); in up_read() 52 mutex_lock(&sem->mtx); in down_write() 62 mutex_unlock(&sem->mtx); in up_write()
|
H A D | rwsem.h | 15 struct mutex mtx; member
|
/linux/kernel/locking/ |
H A D | test-ww_mutex.c | 42 struct test_mutex *mtx = container_of(work, typeof(*mtx), work); in test_mutex_work() local 44 complete(&mtx->ready); in test_mutex_work() 45 wait_for_completion(&mtx->go); in test_mutex_work() 47 if (mtx->flags & TEST_MTX_TRY) { in test_mutex_work() 48 while (!ww_mutex_trylock(&mtx->mutex, NULL)) in test_mutex_work() 51 ww_mutex_lock(&mtx->mutex, NULL); in test_mutex_work() 53 complete(&mtx->done); in test_mutex_work() 54 ww_mutex_unlock(&mtx->mutex); in test_mutex_work() 60 struct test_mutex mtx; in __test_mutex() local 64 ww_mutex_init(&mtx.mutex, &ww_class); in __test_mutex() [all …]
|
/linux/drivers/net/ethernet/atheros/alx/ |
H A D | ethtool.c | 166 mutex_lock(&alx->mtx); in alx_get_link_ksettings() 169 mutex_unlock(&alx->mtx); in alx_get_link_ksettings() 205 mutex_lock(&alx->mtx); in alx_set_link_ksettings() 207 mutex_unlock(&alx->mtx); in alx_set_link_ksettings() 218 mutex_lock(&alx->mtx); in alx_get_pauseparam() 223 mutex_unlock(&alx->mtx); in alx_get_pauseparam() 243 mutex_lock(&alx->mtx); in alx_set_pauseparam() 257 mutex_unlock(&alx->mtx); in alx_set_pauseparam() 267 mutex_unlock(&alx->mtx); in alx_set_pauseparam()
|
H A D | alx.h | 141 struct mutex mtx; member
|
/linux/drivers/staging/vme_user/ |
H A D | vme.c | 274 mutex_lock(&slave_image->mtx); in vme_slave_request() 279 mutex_unlock(&slave_image->mtx); in vme_slave_request() 283 mutex_unlock(&slave_image->mtx); in vme_slave_request() 301 mutex_lock(&slave_image->mtx); in vme_slave_request() 303 mutex_unlock(&slave_image->mtx); in vme_slave_request() 421 mutex_lock(&slave_image->mtx); in vme_slave_free() 426 mutex_unlock(&slave_image->mtx); in vme_slave_free() 842 mutex_lock(&dma_ctrlr->mtx); in vme_dma_request() 846 mutex_unlock(&dma_ctrlr->mtx); in vme_dma_request() 850 mutex_unlock(&dma_ctrlr->mtx); in vme_dma_request() [all …]
|
H A D | vme_fake.c | 206 mutex_lock(&image->mtx); in fake_slave_set() 215 mutex_unlock(&image->mtx); in fake_slave_set() 234 mutex_lock(&image->mtx); in fake_slave_get() 243 mutex_unlock(&image->mtx); in fake_slave_get() 858 mutex_lock(&lm->mtx); in fake_lm_set() 863 mutex_unlock(&lm->mtx); in fake_lm_set() 876 mutex_unlock(&lm->mtx); in fake_lm_set() 885 mutex_unlock(&lm->mtx); in fake_lm_set() 901 mutex_lock(&lm->mtx); in fake_lm_get() 907 mutex_unlock(&lm->mtx); in fake_lm_get() [all …]
|
H A D | vme_tsi148.c | 1798 mutex_lock(&ctrlr->mtx); in tsi148_dma_list_exec() 1809 mutex_unlock(&ctrlr->mtx); in tsi148_dma_list_exec() 1819 mutex_unlock(&ctrlr->mtx); in tsi148_dma_list_exec() 1862 mutex_lock(&ctrlr->mtx); in tsi148_dma_list_exec() 1864 mutex_unlock(&ctrlr->mtx); in tsi148_dma_list_exec() 1913 mutex_lock(&lm->mtx); in tsi148_lm_set() 1918 mutex_unlock(&lm->mtx); in tsi148_lm_set() 1938 mutex_unlock(&lm->mtx); in tsi148_lm_set() 1958 mutex_unlock(&lm->mtx); in tsi148_lm_set() 1974 mutex_lock(&lm->mtx); in tsi148_lm_get() [all …]
|
/linux/drivers/net/ethernet/marvell/prestera/ |
H A D | prestera_counter.c | 16 struct mutex mtx; /* protect block_list */ member 32 struct mutex mtx; /* protect stats and counter_idr */ member 52 mutex_lock(&counter->mtx); in prestera_counter_lock() 57 mutex_unlock(&counter->mtx); in prestera_counter_unlock() 62 mutex_lock(&block->mtx); in prestera_counter_block_lock() 67 mutex_unlock(&block->mtx); in prestera_counter_block_unlock() 176 mutex_init(&block->mtx); in prestera_counter_block_get() 188 mutex_destroy(&block->mtx); in prestera_counter_block_get() 221 mutex_destroy(&block->mtx); in prestera_counter_block_put() 451 mutex_init(&counter->mtx); in prestera_counter_init() [all …]
|
/linux/fs/ |
H A D | eventpoll.c | 186 struct mutex mtx; member 698 return rcu_dereference_check(epi->ws, lockdep_is_held(&epi->ep->mtx)); in ep_wakeup_source() 818 mutex_destroy(&ep->mtx); in ep_free() 907 mutex_lock(&ep->mtx); in ep_clear_and_put() 935 mutex_unlock(&ep->mtx); in ep_clear_and_put() 991 mutex_lock_nested(&ep->mtx, depth); in __ep_eventpoll_poll() 1008 mutex_unlock(&ep->mtx); in __ep_eventpoll_poll() 1078 mutex_lock(&ep->mtx); in ep_show_fdinfo() 1092 mutex_unlock(&ep->mtx); in ep_show_fdinfo() 1136 mutex_lock(&ep->mtx); in eventpoll_release_file() [all …]
|
/linux/drivers/usb/misc/ |
H A D | adutux.c | 71 struct mutex mtx; member 356 if (mutex_lock_interruptible(&dev->mtx)) in adu_read() 498 mutex_unlock(&dev->mtx); in adu_read() 516 retval = mutex_lock_interruptible(&dev->mtx); in adu_write() 541 mutex_unlock(&dev->mtx); in adu_write() 556 retval = mutex_lock_interruptible(&dev->mtx); in adu_write() 610 mutex_unlock(&dev->mtx); in adu_write() 614 mutex_unlock(&dev->mtx); in adu_write() 664 mutex_init(&dev->mtx); in adu_probe() 773 mutex_lock(&dev->mtx); /* not interruptible */ in adu_disconnect() [all …]
|
/linux/net/rfkill/ |
H A D | core.c | 79 struct mutex mtx; member 286 mutex_lock(&data->mtx); in rfkill_send_events() 288 mutex_unlock(&data->mtx); in rfkill_send_events() 1175 mutex_init(&data->mtx); in rfkill_fop_open() 1190 mutex_lock(&data->mtx); in rfkill_fop_open() 1192 mutex_unlock(&data->mtx); in rfkill_fop_open() 1203 mutex_destroy(&data->mtx); in rfkill_fop_open() 1217 mutex_lock(&data->mtx); in rfkill_fop_poll() 1220 mutex_unlock(&data->mtx); in rfkill_fop_poll() 1233 mutex_lock(&data->mtx); in rfkill_fop_read() [all …]
|
/linux/drivers/video/fbdev/omap2/omapfb/ |
H A D | omapfb.h | 80 struct mutex mtx; member 165 mutex_lock(&fbdev->mtx); in omapfb_lock() 170 mutex_unlock(&fbdev->mtx); in omapfb_unlock()
|
/linux/sound/pci/aw2/ |
H A D | aw2-alsa.c | 88 struct mutex mtx; member 281 mutex_init(&chip->mtx); in snd_aw2_probe() 351 mutex_lock(&chip->mtx); in snd_aw2_pcm_prepare_playback() 367 mutex_unlock(&chip->mtx); in snd_aw2_pcm_prepare_playback() 380 mutex_lock(&chip->mtx); in snd_aw2_pcm_prepare_capture() 396 mutex_unlock(&chip->mtx); in snd_aw2_pcm_prepare_capture()
|
/linux/drivers/net/wireless/atmel/ |
H A D | at76c50x-usb.c | 1469 mutex_lock(&priv->mtx); in at76_work_set_promisc() 1481 mutex_unlock(&priv->mtx); in at76_work_set_promisc() 1490 mutex_lock(&priv->mtx); in at76_work_submit_rx() 1492 mutex_unlock(&priv->mtx); in at76_work_submit_rx() 1714 mutex_lock(&priv->mtx); in at76_work_join_bssid() 1719 mutex_unlock(&priv->mtx); in at76_work_join_bssid() 1834 mutex_lock(&priv->mtx); in at76_mac80211_start() 1848 mutex_unlock(&priv->mtx); in at76_mac80211_start() 1863 mutex_lock(&priv->mtx); in at76_mac80211_stop() 1875 mutex_unlock(&priv->mtx); in at76_mac80211_stop() [all …]
|
/linux/net/mac80211/ |
H A D | scan.c | 366 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_prep_hw_scan() 448 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_scan_completed() 457 lockdep_is_held(&local->hw.wiphy->mtx)), in __ieee80211_scan_completed() 474 lockdep_is_held(&local->hw.wiphy->mtx)); in __ieee80211_scan_completed() 623 lockdep_is_held(&local->hw.wiphy->mtx)))) in ieee80211_run_deferred_scan() 669 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_state_send_probe() 680 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_state_send_probe() 927 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_state_decision() 967 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_state_set_channel() 1081 lockdep_is_held(&local->hw.wiphy->mtx)); in ieee80211_scan_work() [all …]
|
/linux/kernel/events/ |
H A D | hw_breakpoint.c | 600 struct mutex *mtx = bp_constraints_lock(bp); in reserve_bp_slot() local 603 bp_constraints_unlock(mtx); in reserve_bp_slot() 619 struct mutex *mtx = bp_constraints_lock(bp); in release_bp_slot() local 622 bp_constraints_unlock(mtx); in release_bp_slot() 649 struct mutex *mtx = bp_constraints_lock(bp); in modify_bp_slot() local 652 bp_constraints_unlock(mtx); in modify_bp_slot()
|
/linux/net/wireless/ |
H A D | core.c | 232 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_stop_p2p_device() 257 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_stop_nan() 528 mutex_init(&rdev->wiphy.mtx); in wiphy_new_nm() 1105 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_process_wiphy_works() 1208 mutex_destroy(&rdev->wiphy.mtx); in cfg80211_dev_free() 1246 lockdep_assert_held(&rdev->wiphy.mtx); in _cfg80211_unregister_wdev() 1322 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_update_iface_num() 1335 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_leave() 1448 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_register_wdev() 1484 lockdep_assert_held(&rdev->wiphy.mtx); in cfg80211_register_netdevice() [all …]
|
/linux/drivers/watchdog/ |
H A D | pcwd_usb.c | 144 struct mutex mtx; member 650 mutex_init(&usb_pcwd->mtx); in usb_pcwd_probe() 779 mutex_lock(&usb_pcwd->mtx); in usb_pcwd_disconnect() 793 mutex_unlock(&usb_pcwd->mtx); in usb_pcwd_disconnect()
|
/linux/drivers/net/usb/ |
H A D | cdc_ncm.c | 298 spin_lock_bh(&ctx->mtx); in tx_timer_usecs_store() 302 spin_unlock_bh(&ctx->mtx); in tx_timer_usecs_store() 348 spin_lock_bh(&ctx->mtx); in ndp_to_end_store() 353 spin_unlock_bh(&ctx->mtx); in ndp_to_end_store() 840 spin_lock_init(&ctx->mtx); in cdc_ncm_bind_common() 1503 spin_lock(&ctx->mtx); in cdc_ncm_txpath_bh() 1507 spin_unlock(&ctx->mtx); in cdc_ncm_txpath_bh() 1510 spin_unlock(&ctx->mtx); in cdc_ncm_txpath_bh() 1515 spin_unlock(&ctx->mtx); in cdc_ncm_txpath_bh() 1535 spin_lock_bh(&ctx->mtx); in cdc_ncm_tx_fixup() [all …]
|
/linux/arch/powerpc/platforms/cell/spufs/ |
H A D | sched.c | 997 struct mutex *mtx = &cbe_spu_info[node].list_mutex; in spusched_thread() local 999 mutex_lock(mtx); in spusched_thread() 1006 mutex_unlock(mtx); in spusched_thread() 1008 mutex_lock(mtx); in spusched_thread() 1012 mutex_unlock(mtx); in spusched_thread()
|
/linux/drivers/net/dsa/microchip/ |
H A D | ksz_common.h | 672 struct mutex *mtx = __mtx; in ksz_regmap_lock() local 673 mutex_lock(mtx); in ksz_regmap_lock() 678 struct mutex *mtx = __mtx; in ksz_regmap_unlock() local 679 mutex_unlock(mtx); in ksz_regmap_unlock()
|