Home
last modified time | relevance | path

Searched refs:mmg (Results 1 – 5 of 5) sorted by relevance

/linux-6.1.9/drivers/misc/habanalabs/common/
Dmemory_mgr.c20 struct hl_mmap_mem_buf *hl_mmap_mem_buf_get(struct hl_mem_mgr *mmg, u64 handle) in hl_mmap_mem_buf_get() argument
24 spin_lock(&mmg->lock); in hl_mmap_mem_buf_get()
25 buf = idr_find(&mmg->handles, lower_32_bits(handle >> PAGE_SHIFT)); in hl_mmap_mem_buf_get()
27 spin_unlock(&mmg->lock); in hl_mmap_mem_buf_get()
28 dev_warn(mmg->dev, in hl_mmap_mem_buf_get()
33 spin_unlock(&mmg->lock); in hl_mmap_mem_buf_get()
67 spin_lock(&buf->mmg->lock); in hl_mmap_mem_buf_release()
68 idr_remove(&buf->mmg->handles, lower_32_bits(buf->handle >> PAGE_SHIFT)); in hl_mmap_mem_buf_release()
69 spin_unlock(&buf->mmg->lock); in hl_mmap_mem_buf_release()
87 idr_remove(&buf->mmg->handles, lower_32_bits(buf->handle >> PAGE_SHIFT)); in hl_mmap_mem_buf_remove_idr_locked()
[all …]
Dcommand_buffer.c262 int hl_cb_create(struct hl_device *hdev, struct hl_mem_mgr *mmg, in hl_cb_create() argument
289 mmg, &cb_behavior, in hl_cb_create()
299 int hl_cb_destroy(struct hl_mem_mgr *mmg, u64 cb_handle) in hl_cb_destroy() argument
303 rc = hl_mmap_mem_buf_put_handle(mmg, cb_handle); in hl_cb_destroy()
308 dev_dbg(mmg->dev, "CB 0x%llx is destroyed while still in use\n", cb_handle); in hl_cb_destroy()
313 static int hl_cb_info(struct hl_mem_mgr *mmg, in hl_cb_info() argument
319 cb = hl_cb_get(mmg, handle); in hl_cb_info()
321 dev_err(mmg->dev, in hl_cb_info()
330 dev_err(mmg->dev, "CB is not mapped to the device's MMU\n"); in hl_cb_info()
406 struct hl_cb *hl_cb_get(struct hl_mem_mgr *mmg, u64 handle) in hl_cb_get() argument
[all …]
Dhabanalabs.h907 struct hl_mem_mgr *mmg; member
3568 int hl_cb_create(struct hl_device *hdev, struct hl_mem_mgr *mmg,
3571 int hl_cb_destroy(struct hl_mem_mgr *mmg, u64 cb_handle);
3573 struct hl_cb *hl_cb_get(struct hl_mem_mgr *mmg, u64 handle);
3788 void hl_mem_mgr_init(struct device *dev, struct hl_mem_mgr *mmg);
3789 void hl_mem_mgr_fini(struct hl_mem_mgr *mmg);
3790 int hl_mem_mgr_mmap(struct hl_mem_mgr *mmg, struct vm_area_struct *vma,
3792 struct hl_mmap_mem_buf *hl_mmap_mem_buf_get(struct hl_mem_mgr *mmg,
3794 int hl_mmap_mem_buf_put_handle(struct hl_mem_mgr *mmg, u64 handle);
3797 hl_mmap_mem_buf_alloc(struct hl_mem_mgr *mmg,
Dcommand_submission.c1185 struct hl_mem_mgr *mmg, in get_cb_from_cs_chunk() argument
1190 cb = hl_cb_get(mmg, chunk->cb_handle); in get_cb_from_cs_chunk()
3054 dev_err(buf->mmg->dev, "Ts offset exceeds max CB offset(0x%llx)\n", in ts_buff_get_kernel_ts_record()
3076 dev_dbg(buf->mmg->dev, in ts_buff_get_kernel_ts_record()
3079 dev_dbg(buf->mmg->dev, in ts_buff_get_kernel_ts_record()
3086 dev_err(buf->mmg->dev, in ts_buff_get_kernel_ts_record()
3109 dev_dbg(buf->mmg->dev, "Found available node in TS kernel CB %p\n", in ts_buff_get_kernel_ts_record()
3115 struct hl_mem_mgr *cb_mmg, struct hl_mem_mgr *mmg, in _hl_interrupt_wait_ioctl() argument
3148 buf = hl_mmap_mem_buf_get(mmg, ts_handle); in _hl_interrupt_wait_ioctl()
Dmemory.c2154 struct hl_mem_mgr *mmg = &hpriv->mem_mgr; in allocate_timestamps_buffers() local
2158 dev_err(mmg->dev, "Num of elements exceeds Max allowed number (0x%x > 0x%x)\n", in allocate_timestamps_buffers()
2163 buf = hl_mmap_mem_buf_alloc(mmg, &hl_ts_behavior, GFP_KERNEL, &args->num_of_elements); in allocate_timestamps_buffers()