/openbmc/linux/drivers/accel/habanalabs/common/ |
H A D | context.c | 81 static void hl_ctx_fini(struct hl_ctx *ctx) in hl_ctx_fini() 132 struct hl_ctx *ctx; in hl_ctx_do_release() 134 ctx = container_of(ref, struct hl_ctx, refcount); in hl_ctx_do_release() 154 struct hl_ctx *ctx; in hl_ctx_create() 199 int hl_ctx_init(struct hl_device *hdev, struct hl_ctx *ctx, bool is_kernel_ctx) in hl_ctx_init() 289 static int hl_ctx_get_unless_zero(struct hl_ctx *ctx) in hl_ctx_get_unless_zero() 294 void hl_ctx_get(struct hl_ctx *ctx) in hl_ctx_get() 299 int hl_ctx_put(struct hl_ctx *ctx) in hl_ctx_put() 304 struct hl_ctx *hl_get_compute_ctx(struct hl_device *hdev) in hl_get_compute_ctx() 306 struct hl_ctx *ctx = NULL; in hl_get_compute_ctx() [all …]
|
H A D | habanalabs.h | 294 struct hl_ctx *ctx; 956 struct hl_ctx *ctx; 1641 int (*mmu_prefetch_cache_range)(struct hl_ctx *ctx, u32 flags, u32 asid, u64 va, u64 size); 1643 int (*debug_coresight)(struct hl_device *hdev, struct hl_ctx *ctx, void *data); 1658 void (*halt_coresight)(struct hl_device *hdev, struct hl_ctx *ctx); 1659 int (*ctx_init)(struct hl_ctx *ctx); 1660 void (*ctx_fini)(struct hl_ctx *ctx); 1678 struct hl_ctx *ctx, struct hl_cs *cs, 1782 struct hl_ctx *ctx; 1864 struct hl_ctx { struct [all …]
|
H A D | memory.c | 87 static int alloc_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args, in alloc_device_memory() 353 static int free_device_memory(struct hl_ctx *ctx, struct hl_mem_in *args) in free_device_memory() 756 u64 hl_reserve_va_block(struct hl_device *hdev, struct hl_ctx *ctx, in hl_reserve_va_block() 773 static int hl_get_va_range_type(struct hl_ctx *ctx, u64 address, u64 size, in hl_get_va_range_type() 800 int hl_unreserve_va_block(struct hl_device *hdev, struct hl_ctx *ctx, in hl_unreserve_va_block() 839 static int init_phys_pg_pack_from_userptr(struct hl_ctx *ctx, in init_phys_pg_pack_from_userptr() 943 static int map_phys_pg_pack(struct hl_ctx *ctx, u64 vaddr, in map_phys_pg_pack() 1006 static void unmap_phys_pg_pack(struct hl_ctx *ctx, u64 vaddr, in unmap_phys_pg_pack() 1050 static int map_device_va(struct hl_ctx *ctx, struct hl_mem_in *args, u64 *device_addr) in map_device_va() 1251 static struct hl_vm_hash_node *get_vm_hash_node_locked(struct hl_ctx *ctx, u64 vaddr) in get_vm_hash_node_locked() [all …]
|
H A D | command_buffer.c | 17 static int cb_map_mem(struct hl_ctx *ctx, struct hl_cb *cb) in cb_map_mem() 68 static void cb_unmap_mem(struct hl_ctx *ctx, struct hl_cb *cb) in cb_unmap_mem() 162 struct hl_ctx *ctx; 267 struct hl_ctx *ctx, u32 cb_size, bool internal_cb, in hl_cb_create() 509 int hl_cb_va_pool_init(struct hl_ctx *ctx) in hl_cb_va_pool_init() 548 void hl_cb_va_pool_fini(struct hl_ctx *ctx) in hl_cb_va_pool_fini()
|
H A D | command_submission.c | 35 static int _hl_cs_wait_ioctl(struct hl_device *hdev, struct hl_ctx *ctx, u64 timeout_us, u64 seq, 880 static int allocate_cs(struct hl_device *hdev, struct hl_ctx *ctx, in allocate_cs() 1029 struct hl_ctx *ctx = hl_get_compute_ctx(hdev); in release_reserved_encaps_signals() 1329 struct hl_ctx *ctx = hpriv->ctx; in hl_cs_sanity_checks() 1390 struct hl_ctx *ctx) in hl_cs_copy_chunk_array() 1478 struct hl_ctx *ctx = hpriv->ctx; in cs_ioctl_default() 1671 struct hl_ctx *ctx = hpriv->ctx; in hl_cs_ctx_switch() 1866 struct hl_cs_chunk *chunk, u64 *signal_seq, struct hl_ctx *ctx, in cs_ioctl_extract_signal_seq() 1924 struct hl_ctx *ctx, struct hl_cs *cs, in cs_ioctl_signal_wait_create_jobs() 2200 struct hl_ctx *ctx = hpriv->ctx; in cs_ioctl_signal_wait() [all …]
|
H A D | decoder.c | 127 void hl_dec_ctx_fini(struct hl_ctx *ctx) in hl_dec_ctx_fini()
|
H A D | debugfs.c | 246 struct hl_ctx *ctx; in vm_show() 431 struct hl_ctx *ctx; in mmu_show() 693 struct hl_ctx *ctx; in device_va_to_pa() 1896 void hl_debugfs_add_ctx_mem_hash(struct hl_device *hdev, struct hl_ctx *ctx) in hl_debugfs_add_ctx_mem_hash() 1905 void hl_debugfs_remove_ctx_mem_hash(struct hl_device *hdev, struct hl_ctx *ctx) in hl_debugfs_remove_ctx_mem_hash()
|
H A D | device.c | 743 struct hl_ctx *ctx = hl_get_compute_ctx(hdev); in device_hard_reset_pending() 1123 int hl_device_set_debug_mode(struct hl_device *hdev, struct hl_ctx *ctx, bool enable) in hl_device_set_debug_mode() 1498 struct hl_ctx *ctx; in hl_device_reset() 1909 struct hl_ctx *ctx = NULL; in hl_device_cond_reset() 2570 struct hl_ctx *ctx; in hl_capture_user_mappings()
|
H A D | hw_queue.c | 549 struct hl_ctx *ctx = cs->ctx; in init_signal_wait_cs() 629 struct hl_ctx *ctx = cs->ctx; in hl_hw_queue_schedule_cs()
|
H A D | habanalabs_ioctl.c | 195 static int debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, struct hl_debug_args *args) in debug_coresight()
|
/openbmc/linux/drivers/accel/habanalabs/common/mmu/ |
H A D | mmu_v1.c | 15 static inline u64 get_phys_addr(struct hl_ctx *ctx, u64 shadow_addr); 17 static struct pgt_info *get_pgt_info(struct hl_ctx *ctx, u64 hop_addr) in get_pgt_info() 29 static void _free_hop(struct hl_ctx *ctx, struct pgt_info *pgt_info) in _free_hop() 40 static void free_hop(struct hl_ctx *ctx, u64 hop_addr) in free_hop() 47 static u64 alloc_hop(struct hl_ctx *ctx) in alloc_hop() 87 static inline u64 get_phys_hop0_addr(struct hl_ctx *ctx) in get_phys_hop0_addr() 93 static inline u64 get_hop0_addr(struct hl_ctx *ctx) in get_hop0_addr() 99 static void flush(struct hl_ctx *ctx) in flush() 107 static inline void write_pte(struct hl_ctx *ctx, u64 shadow_pte_addr, u64 val) in write_pte() 127 static inline void write_final_pte(struct hl_ctx *ctx, u64 shadow_pte_addr, in write_final_pte() [all …]
|
H A D | mmu.c | 105 int hl_mmu_ctx_init(struct hl_ctx *ctx) in hl_mmu_ctx_init() 144 void hl_mmu_ctx_fini(struct hl_ctx *ctx) in hl_mmu_ctx_fini() 226 int hl_mmu_unmap_page(struct hl_ctx *ctx, u64 virt_addr, u32 page_size, bool flush_pte) in hl_mmu_unmap_page() 292 int hl_mmu_map_page(struct hl_ctx *ctx, u64 virt_addr, u64 phys_addr, u32 page_size, in hl_mmu_map_page() 381 int hl_mmu_map_contiguous(struct hl_ctx *ctx, u64 virt_addr, in hl_mmu_map_contiguous() 442 int hl_mmu_unmap_contiguous(struct hl_ctx *ctx, u64 virt_addr, u32 size) in hl_mmu_unmap_contiguous() 475 static void hl_mmu_pa_page_with_offset(struct hl_ctx *ctx, u64 virt_addr, in hl_mmu_pa_page_with_offset() 531 int hl_mmu_va_to_pa(struct hl_ctx *ctx, u64 virt_addr, u64 *phys_addr) in hl_mmu_va_to_pa() 547 int hl_mmu_get_tlb_info(struct hl_ctx *ctx, u64 virt_addr, in hl_mmu_get_tlb_info() 668 struct hl_ctx *ctx = pfw->ctx; in hl_mmu_prefetch_work_function() [all …]
|
H A D | mmu_v2_hr.c | 13 static struct pgt_info *hl_mmu_v2_hr_get_pgt_info(struct hl_ctx *ctx, u64 phys_hop_addr) in hl_mmu_v2_hr_get_pgt_info() 25 static void hl_mmu_v2_hr_add_pgt_info(struct hl_ctx *ctx, struct pgt_info *pgt_info, in hl_mmu_v2_hr_add_pgt_info() 31 static struct pgt_info *hl_mmu_v2_hr_get_hop0_pgt_info(struct hl_ctx *ctx) in hl_mmu_v2_hr_get_hop0_pgt_info() 79 static int hl_mmu_v2_hr_ctx_init(struct hl_ctx *ctx) in hl_mmu_v2_hr_ctx_init() 95 static void hl_mmu_v2_hr_ctx_fini(struct hl_ctx *ctx) in hl_mmu_v2_hr_ctx_fini() 115 static int _hl_mmu_v2_hr_unmap(struct hl_ctx *ctx, in _hl_mmu_v2_hr_unmap() 205 static int _hl_mmu_v2_hr_map(struct hl_ctx *ctx, in _hl_mmu_v2_hr_map() 317 static void hl_mmu_v2_hr_swap_out(struct hl_ctx *ctx) in hl_mmu_v2_hr_swap_out() 328 static void hl_mmu_v2_hr_swap_in(struct hl_ctx *ctx) in hl_mmu_v2_hr_swap_in() 370 static int hl_mmu_v2_hr_get_tlb_info(struct hl_ctx *ctx, u64 virt_addr, in hl_mmu_v2_hr_get_tlb_info()
|
/openbmc/linux/drivers/accel/habanalabs/gaudi/ |
H A D | gaudiP.h | 339 int gaudi_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data); 340 void gaudi_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx);
|
H A D | gaudi_coresight.c | 852 int gaudi_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data) in gaudi_debug_coresight() 891 void gaudi_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx) in gaudi_halt_coresight()
|
H A D | gaudi.c | 1317 struct hl_ctx *ctx; in gaudi_collective_wait_init_cs() 1426 struct hl_ctx *ctx, struct hl_cs *cs, in gaudi_collective_wait_create_job() 1522 struct hl_ctx *ctx, struct hl_cs *cs, in gaudi_collective_wait_create_jobs() 8293 struct hl_ctx *ctx) in gaudi_internal_cb_pool_init() 8373 struct hl_ctx *ctx) in gaudi_internal_cb_pool_fini() 8394 static int gaudi_ctx_init(struct hl_ctx *ctx) in gaudi_ctx_init() 8412 static void gaudi_ctx_fini(struct hl_ctx *ctx) in gaudi_ctx_fini()
|
/openbmc/linux/drivers/accel/habanalabs/goya/ |
H A D | goyaP.h | 223 int goya_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data); 224 void goya_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx);
|
H A D | goya_coresight.c | 650 int goya_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data) in goya_debug_coresight() 689 void goya_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx) in goya_halt_coresight()
|
H A D | goya.c | 5247 static int goya_ctx_init(struct hl_ctx *ctx) in goya_ctx_init() 5310 struct hl_ctx *ctx, struct hl_cs *cs, u32 wait_queue_id, in goya_collective_wait_create_jobs() 5316 static void goya_ctx_fini(struct hl_ctx *ctx) in goya_ctx_fini()
|
/openbmc/linux/drivers/accel/habanalabs/gaudi2/ |
H A D | gaudi2P.h | 603 int gaudi2_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data); 604 void gaudi2_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx);
|
H A D | gaudi2_coresight.c | 2180 static int gaudi2_config_etr(struct hl_device *hdev, struct hl_ctx *ctx, in gaudi2_config_etr() 2527 int gaudi2_debug_coresight(struct hl_device *hdev, struct hl_ctx *ctx, void *data) in gaudi2_debug_coresight() 2562 void gaudi2_halt_coresight(struct hl_device *hdev, struct hl_ctx *ctx) in gaudi2_halt_coresight()
|
H A D | gaudi2.c | 10303 struct hl_ctx *ctx; in gaudi2_debugfs_read_dma() 10397 static int gaudi2_internal_cb_pool_init(struct hl_device *hdev, struct hl_ctx *ctx) in gaudi2_internal_cb_pool_init() 10468 static void gaudi2_internal_cb_pool_fini(struct hl_device *hdev, struct hl_ctx *ctx) in gaudi2_internal_cb_pool_fini() 10493 static int gaudi2_map_virtual_msix_doorbell_memory(struct hl_ctx *ctx) in gaudi2_map_virtual_msix_doorbell_memory() 10509 static void gaudi2_unmap_virtual_msix_doorbell_memory(struct hl_ctx *ctx) in gaudi2_unmap_virtual_msix_doorbell_memory() 10522 static int gaudi2_ctx_init(struct hl_ctx *ctx) in gaudi2_ctx_init() 10549 static void gaudi2_ctx_fini(struct hl_ctx *ctx) in gaudi2_ctx_fini() 10763 static int gaudi2_collective_wait_create_jobs(struct hl_device *hdev, struct hl_ctx *ctx, in gaudi2_collective_wait_create_jobs()
|