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()
1090 struct ttm_mem_global *mem_glob = bdev->glob->mem_glob; in ttm_bo_init()
1124 bo->glob = bdev->glob; in ttm_bo_init()
1146 atomic_inc(&bo->glob->bo_count); in ttm_bo_init()
1240 struct ttm_bo_global *glob = bdev->glob; in ttm_bo_force_list_clean() local
1247 spin_lock(&glob->lru_lock); in ttm_bo_force_list_clean()
1249 spin_unlock(&glob->lru_lock); in ttm_bo_force_list_clean()
1258 spin_lock(&glob->lru_lock); in ttm_bo_force_list_clean()
1260 spin_unlock(&glob->lru_lock); in ttm_bo_force_list_clean()
1350 struct ttm_bo_global *glob = in ttm_bo_global_kobj_release() local
1353 ttm_mem_unregister_shrink(glob->mem_glob, &glob->shrink); in ttm_bo_global_kobj_release()
1354 __free_page(glob->dummy_read_page); in ttm_bo_global_kobj_release()
1355 kfree(glob); in ttm_bo_global_kobj_release()
1360 struct ttm_bo_global *glob = ref->object; in ttm_bo_global_release() local
1362 kobject_del(&glob->kobj); in ttm_bo_global_release()
1363 kobject_put(&glob->kobj); in ttm_bo_global_release()
1371 struct ttm_bo_global *glob = ref->object; in ttm_bo_global_init() local
1374 mutex_init(&glob->device_list_mutex); in ttm_bo_global_init()
1375 spin_lock_init(&glob->lru_lock); in ttm_bo_global_init()
1376 glob->mem_glob = bo_ref->mem_glob; in ttm_bo_global_init()
1377 glob->dummy_read_page = alloc_page(__GFP_ZERO | GFP_DMA32); in ttm_bo_global_init()
1379 if (unlikely(glob->dummy_read_page == NULL)) { in ttm_bo_global_init()
1384 INIT_LIST_HEAD(&glob->swap_lru); in ttm_bo_global_init()
1385 INIT_LIST_HEAD(&glob->device_list); in ttm_bo_global_init()
1387 ttm_mem_init_shrink(&glob->shrink, ttm_bo_swapout); in ttm_bo_global_init()
1388 ret = ttm_mem_register_shrink(glob->mem_glob, &glob->shrink); in ttm_bo_global_init()
1394 atomic_set(&glob->bo_count, 0); in ttm_bo_global_init()
1397 &glob->kobj, &ttm_bo_glob_kobj_type, ttm_get_kobj(), "buffer_objects"); in ttm_bo_global_init()
1399 kobject_put(&glob->kobj); in ttm_bo_global_init()
1402 __free_page(glob->dummy_read_page); in ttm_bo_global_init()
1404 kfree(glob); in ttm_bo_global_init()
1415 struct ttm_bo_global *glob = bdev->glob; in ttm_bo_device_release() local
1430 mutex_lock(&glob->device_list_mutex); in ttm_bo_device_release()
1432 mutex_unlock(&glob->device_list_mutex); in ttm_bo_device_release()
1439 spin_lock(&glob->lru_lock); in ttm_bo_device_release()
1445 spin_unlock(&glob->lru_lock); in ttm_bo_device_release()
1454 struct ttm_bo_global *glob, in ttm_bo_device_init() argument
1479 bdev->glob = glob; in ttm_bo_device_init()
1482 mutex_lock(&glob->device_list_mutex); in ttm_bo_device_init()
1483 list_add_tail(&bdev->device_list, &glob->device_list); in ttm_bo_device_init()
1484 mutex_unlock(&glob->device_list_mutex); in ttm_bo_device_init()
1614 struct ttm_bo_global *glob = in ttm_bo_swapout() local
1621 spin_lock(&glob->lru_lock); in ttm_bo_swapout()
1622 list_for_each_entry(bo, &glob->swap_lru, swap) { in ttm_bo_swapout()
1629 spin_unlock(&glob->lru_lock); in ttm_bo_swapout()
1642 spin_unlock(&glob->lru_lock); in ttm_bo_swapout()
1695 while (ttm_bo_swapout(&bdev->glob->shrink) == 0) in ttm_bo_swapout_all()