Lines Matching refs:context
54 static struct mlx4_db_page *__add_page(struct mlx4_context *context,
58 int ps = to_mdev(context->ibv_ctx.device)->page_size;
79 page->next = context->db_list[type];
80 context->db_list[type] = page;
87 uint32_t *mlx4_alloc_db(struct mlx4_context *context, enum mlx4_db_type type)
93 pthread_mutex_lock(&context->db_list_mutex);
95 for (page = context->db_list[type]; page; page = page->next)
99 page = __add_page(context, type);
114 pthread_mutex_unlock(&context->db_list_mutex);
119 void mlx4_free_db(struct mlx4_context *context, enum mlx4_db_type type, uint32_t *db)
122 uintptr_t ps = to_mdev(context->ibv_ctx.device)->page_size;
125 pthread_mutex_lock(&context->db_list_mutex);
127 for (page = context->db_list[type]; page; page = page->next)
141 context->db_list[type] = page->next;
150 pthread_mutex_unlock(&context->db_list_mutex);