Lines Matching defs:cb_size
103 static struct hl_cb *hl_cb_alloc(struct hl_device *hdev, u32 cb_size,
128 p = (void *) gen_pool_alloc(hdev->internal_cb_pool, cb_size);
138 p = hl_asic_dma_alloc_coherent(hdev, cb_size, &cb->bus_address, GFP_ATOMIC);
140 p = hl_asic_dma_alloc_coherent(hdev, cb_size, &cb->bus_address, GFP_KERNEL);
142 p = hl_asic_dma_alloc_coherent(hdev, cb_size, &cb->bus_address,
149 cb_size);
155 cb->size = cb_size;
163 u32 cb_size;
191 if (cb_args->cb_size < PAGE_SIZE)
192 cb_args->cb_size = PAGE_SIZE;
195 cb_args->cb_size <= cb_args->hdev->asic_prop.cb_pool_cb_size) {
212 cb = hl_cb_alloc(cb_args->hdev, cb_args->cb_size, ctx_id, cb_args->internal_cb);
267 struct hl_ctx *ctx, u32 cb_size, bool internal_cb,
273 .cb_size = cb_size,
286 if (cb_size > SZ_2M) {
288 cb_size, SZ_2M);
383 if (args->in.cb_size > HL_MAX_CB_SIZE) {
386 args->in.cb_size, HL_MAX_CB_SIZE);
390 args->in.cb_size, false,
444 struct hl_cb *hl_cb_kernel_create(struct hl_device *hdev, u32 cb_size,
451 rc = hl_cb_create(hdev, &hdev->kernel_mem_mgr, hdev->kernel_ctx, cb_size,