Lines Matching refs:context
57 static struct mlx4_db_page *__add_page(struct mlx4_context *context,
61 int ps = to_mdev(context->ibv_ctx.device)->page_size;
82 page->next = context->db_list[type];
83 context->db_list[type] = page;
90 uint32_t *mlx4_alloc_db(struct mlx4_context *context, enum mlx4_db_type type)
96 pthread_mutex_lock(&context->db_list_mutex);
98 for (page = context->db_list[type]; page; page = page->next)
102 page = __add_page(context, type);
117 pthread_mutex_unlock(&context->db_list_mutex);
122 void mlx4_free_db(struct mlx4_context *context, enum mlx4_db_type type, uint32_t *db)
125 uintptr_t ps = to_mdev(context->ibv_ctx.device)->page_size;
128 pthread_mutex_lock(&context->db_list_mutex);
130 for (page = context->db_list[type]; page; page = page->next)
144 context->db_list[type] = page->next;
153 pthread_mutex_unlock(&context->db_list_mutex);