Lines Matching defs:func_id
38 u16 func_id;
253 alloc_4k(struct mlx5_core_dev *dev, u64 *addr, u16 func_id)
262 fwp->func_id = func_id;
296 static int mlx5_cmd_query_pages(struct mlx5_core_dev *dev, u16 *func_id,
313 *func_id = MLX5_GET(query_pages_out, out, function_id);
318 static int give_pages(struct mlx5_core_dev *dev, u16 func_id, int npages,
337 err = alloc_4k(dev, &addr, func_id);
345 MLX5_SET(manage_pages_in, in, function_id, func_id);
350 mlx5_core_warn(dev, "func_id 0x%x, npages %d, err %d\n",
351 func_id, npages, err);
355 dev->priv.pages_per_func[func_id] += npages;
370 MLX5_SET(manage_pages_in, nin, function_id, func_id);
389 u32 func_id;
398 func_id = MLX5_GET(manage_pages_in, in, function_id);
404 if (fwp->func_id != func_id)
415 static int reclaim_pages(struct mlx5_core_dev *dev, u32 func_id, int npages,
435 MLX5_SET(manage_pages_in, in, function_id, func_id);
450 dev->priv.pages_per_func[func_id] -= num_claimed;
466 err = reclaim_pages(dev, req->func_id, -1 * req->npages, NULL);
468 err = give_pages(dev, req->func_id, req->npages, 1);
477 void mlx5_core_req_pages_handler(struct mlx5_core_dev *dev, u16 func_id,
489 req->func_id = func_id;
498 u16 uninitialized_var(func_id);
502 err = mlx5_cmd_query_pages(dev, &func_id, &npages, boot);
506 mlx5_core_dbg(dev, "requested %d %s pages for func_id 0x%x\n",
507 npages, boot ? "boot" : "init", func_id);
509 return give_pages(dev, func_id, npages, 0);
566 err = reclaim_pages(dev, fwp->func_id,