Lines Matching refs:cb_size
181 static struct hl_cb *hl_cb_alloc(struct hl_device *hdev, u32 cb_size, in hl_cb_alloc() argument
206 p = (void *) gen_pool_alloc(hdev->internal_cb_pool, cb_size); in hl_cb_alloc()
216 p = hdev->asic_funcs->asic_dma_alloc_coherent(hdev, cb_size, in hl_cb_alloc()
220 cb_size, &cb->bus_address, GFP_KERNEL); in hl_cb_alloc()
222 p = hdev->asic_funcs->asic_dma_alloc_coherent(hdev, cb_size, in hl_cb_alloc()
230 cb_size); in hl_cb_alloc()
236 cb->size = cb_size; in hl_cb_alloc()
242 struct hl_ctx *ctx, u32 cb_size, bool internal_cb, in hl_cb_create() argument
261 if (cb_size > SZ_2M) { in hl_cb_create()
263 cb_size, SZ_2M); in hl_cb_create()
270 if (cb_size < PAGE_SIZE) in hl_cb_create()
271 cb_size = PAGE_SIZE; in hl_cb_create()
274 cb_size <= hdev->asic_prop.cb_pool_cb_size) { in hl_cb_create()
291 cb = hl_cb_alloc(hdev, cb_size, ctx_id, internal_cb); in hl_cb_create()
430 if (args->in.cb_size > HL_MAX_CB_SIZE) { in hl_cb_ioctl()
433 args->in.cb_size, HL_MAX_CB_SIZE); in hl_cb_ioctl()
437 args->in.cb_size, false, in hl_cb_ioctl()
625 struct hl_cb *hl_cb_kernel_create(struct hl_device *hdev, u32 cb_size, in hl_cb_kernel_create() argument
632 rc = hl_cb_create(hdev, &hdev->kernel_cb_mgr, hdev->kernel_ctx, cb_size, in hl_cb_kernel_create()