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