Lines Matching refs:glob

108 	struct ttm_bo_global *glob =  in ttm_bo_global_show()  local
112 (unsigned long) atomic_read(&glob->bo_count)); in ttm_bo_global_show()
152 atomic_dec(&bo->glob->bo_count); in ttm_bo_release_list()
161 ttm_mem_global_free(bdev->glob->mem_glob, acc_size); in ttm_bo_release_list()
180 list_add_tail(&bo->swap, &bo->glob->swap_lru); in ttm_bo_add_to_lru()
224 spin_lock(&bo->glob->lru_lock); in ttm_bo_del_sub_from_lru()
226 spin_unlock(&bo->glob->lru_lock); in ttm_bo_del_sub_from_lru()
237 struct ttm_bo_global *glob = bo->glob; in ttm_bo_add_ttm() local
253 page_flags, glob->dummy_read_page); in ttm_bo_add_ttm()
260 glob->dummy_read_page); in ttm_bo_add_ttm()
429 struct ttm_bo_global *glob = bo->glob; in ttm_bo_cleanup_refs_or_queue() local
433 spin_lock(&glob->lru_lock); in ttm_bo_cleanup_refs_or_queue()
440 spin_unlock(&glob->lru_lock); in ttm_bo_cleanup_refs_or_queue()
464 spin_unlock(&glob->lru_lock); in ttm_bo_cleanup_refs_or_queue()
486 struct ttm_bo_global *glob = bo->glob; in ttm_bo_cleanup_refs_and_unlock() local
495 spin_unlock(&glob->lru_lock); in ttm_bo_cleanup_refs_and_unlock()
507 spin_lock(&glob->lru_lock); in ttm_bo_cleanup_refs_and_unlock()
519 spin_unlock(&glob->lru_lock); in ttm_bo_cleanup_refs_and_unlock()
533 spin_unlock(&glob->lru_lock); in ttm_bo_cleanup_refs_and_unlock()
541 spin_unlock(&glob->lru_lock); in ttm_bo_cleanup_refs_and_unlock()
556 struct ttm_bo_global *glob = bdev->glob; in ttm_bo_delayed_delete() local
560 spin_lock(&glob->lru_lock); in ttm_bo_delayed_delete()
579 spin_unlock(&glob->lru_lock); in ttm_bo_delayed_delete()
582 spin_lock(&glob->lru_lock); in ttm_bo_delayed_delete()
589 spin_unlock(&glob->lru_lock); in ttm_bo_delayed_delete()
597 spin_lock(&glob->lru_lock); in ttm_bo_delayed_delete()
603 spin_unlock(&glob->lru_lock); in ttm_bo_delayed_delete()
716 struct ttm_bo_global *glob = bdev->glob; in ttm_mem_evict_first() local
721 spin_lock(&glob->lru_lock); in ttm_mem_evict_first()
742 spin_unlock(&glob->lru_lock); in ttm_mem_evict_first()
756 spin_unlock(&glob->lru_lock); in ttm_mem_evict_first()
1094 struct ttm_mem_global *mem_glob = bdev->glob->mem_glob; in ttm_bo_init()
1128 bo->glob = bdev->glob; in ttm_bo_init()
1150 atomic_inc(&bo->glob->bo_count); in ttm_bo_init()
1244 struct ttm_bo_global *glob = bdev->glob; in ttm_bo_force_list_clean() local
1251 spin_lock(&glob->lru_lock); in ttm_bo_force_list_clean()
1253 spin_unlock(&glob->lru_lock); in ttm_bo_force_list_clean()
1262 spin_lock(&glob->lru_lock); in ttm_bo_force_list_clean()
1264 spin_unlock(&glob->lru_lock); in ttm_bo_force_list_clean()
1354 struct ttm_bo_global *glob = in ttm_bo_global_kobj_release() local
1357 ttm_mem_unregister_shrink(glob->mem_glob, &glob->shrink); in ttm_bo_global_kobj_release()
1358 __free_page(glob->dummy_read_page); in ttm_bo_global_kobj_release()
1359 kfree(glob); in ttm_bo_global_kobj_release()
1364 struct ttm_bo_global *glob = ref->object; in ttm_bo_global_release() local
1366 kobject_del(&glob->kobj); in ttm_bo_global_release()
1367 kobject_put(&glob->kobj); in ttm_bo_global_release()
1375 struct ttm_bo_global *glob = ref->object; in ttm_bo_global_init() local
1378 mutex_init(&glob->device_list_mutex); in ttm_bo_global_init()
1379 spin_lock_init(&glob->lru_lock); in ttm_bo_global_init()
1380 glob->mem_glob = bo_ref->mem_glob; in ttm_bo_global_init()
1381 glob->dummy_read_page = alloc_page(__GFP_ZERO | GFP_DMA32); in ttm_bo_global_init()
1383 if (unlikely(glob->dummy_read_page == NULL)) { in ttm_bo_global_init()
1388 INIT_LIST_HEAD(&glob->swap_lru); in ttm_bo_global_init()
1389 INIT_LIST_HEAD(&glob->device_list); in ttm_bo_global_init()
1391 ttm_mem_init_shrink(&glob->shrink, ttm_bo_swapout); in ttm_bo_global_init()
1392 ret = ttm_mem_register_shrink(glob->mem_glob, &glob->shrink); in ttm_bo_global_init()
1398 atomic_set(&glob->bo_count, 0); in ttm_bo_global_init()
1401 &glob->kobj, &ttm_bo_glob_kobj_type, ttm_get_kobj(), "buffer_objects"); in ttm_bo_global_init()
1403 kobject_put(&glob->kobj); in ttm_bo_global_init()
1406 __free_page(glob->dummy_read_page); in ttm_bo_global_init()
1408 kfree(glob); in ttm_bo_global_init()
1419 struct ttm_bo_global *glob = bdev->glob; in ttm_bo_device_release() local
1434 mutex_lock(&glob->device_list_mutex); in ttm_bo_device_release()
1436 mutex_unlock(&glob->device_list_mutex); in ttm_bo_device_release()
1443 spin_lock(&glob->lru_lock); in ttm_bo_device_release()
1449 spin_unlock(&glob->lru_lock); in ttm_bo_device_release()
1458 struct ttm_bo_global *glob, in ttm_bo_device_init() argument
1483 bdev->glob = glob; in ttm_bo_device_init()
1486 mutex_lock(&glob->device_list_mutex); in ttm_bo_device_init()
1487 list_add_tail(&bdev->device_list, &glob->device_list); in ttm_bo_device_init()
1488 mutex_unlock(&glob->device_list_mutex); in ttm_bo_device_init()
1618 struct ttm_bo_global *glob = in ttm_bo_swapout() local
1625 spin_lock(&glob->lru_lock); in ttm_bo_swapout()
1626 list_for_each_entry(bo, &glob->swap_lru, swap) { in ttm_bo_swapout()
1633 spin_unlock(&glob->lru_lock); in ttm_bo_swapout()
1646 spin_unlock(&glob->lru_lock); in ttm_bo_swapout()
1699 while (ttm_bo_swapout(&bdev->glob->shrink) == 0) in ttm_bo_swapout_all()