Home
last modified time | relevance | path

Searched refs:res_pool (Results 1 – 2 of 2) sorted by relevance

/drivers/staging/fsl-mc/bus/
Dmc-allocator.c37 struct fsl_mc_resource_pool *res_pool; in fsl_mc_resource_pool_add_device() local
50 res_pool = &mc_bus->resource_pools[pool_type]; in fsl_mc_resource_pool_add_device()
51 if (WARN_ON(res_pool->type != pool_type)) in fsl_mc_resource_pool_add_device()
53 if (WARN_ON(res_pool->mc_bus != mc_bus)) in fsl_mc_resource_pool_add_device()
56 mutex_lock(&res_pool->mutex); in fsl_mc_resource_pool_add_device()
59 if (WARN_ON(res_pool->max_count < 0)) in fsl_mc_resource_pool_add_device()
61 if (WARN_ON(res_pool->free_count < 0 || in fsl_mc_resource_pool_add_device()
62 res_pool->free_count > res_pool->max_count)) in fsl_mc_resource_pool_add_device()
77 resource->parent_pool = res_pool; in fsl_mc_resource_pool_add_device()
79 list_add_tail(&resource->node, &res_pool->free_list); in fsl_mc_resource_pool_add_device()
[all …]
Ddprc-driver.c197 struct fsl_mc_resource_pool *res_pool = in dprc_init_all_resource_pools() local
200 res_pool->type = pool_type; in dprc_init_all_resource_pools()
201 res_pool->max_count = 0; in dprc_init_all_resource_pools()
202 res_pool->free_count = 0; in dprc_init_all_resource_pools()
203 res_pool->mc_bus = mc_bus; in dprc_init_all_resource_pools()
204 INIT_LIST_HEAD(&res_pool->free_list); in dprc_init_all_resource_pools()
205 mutex_init(&res_pool->mutex); in dprc_init_all_resource_pools()
215 struct fsl_mc_resource_pool *res_pool = in dprc_cleanup_resource_pool() local
219 WARN_ON(res_pool->type != pool_type); in dprc_cleanup_resource_pool()
220 WARN_ON(res_pool->free_count != res_pool->max_count); in dprc_cleanup_resource_pool()
[all …]