Lines Matching refs:dev_entry
99 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in command_buffers_show() local
103 spin_lock(&dev_entry->cb_spinlock); in command_buffers_show()
105 list_for_each_entry(cb, &dev_entry->cb_list, debugfs_list) { in command_buffers_show()
119 spin_unlock(&dev_entry->cb_spinlock); in command_buffers_show()
130 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in command_submission_show() local
134 spin_lock(&dev_entry->cs_spinlock); in command_submission_show()
136 list_for_each_entry(cs, &dev_entry->cs_list, debugfs_list) { in command_submission_show()
150 spin_unlock(&dev_entry->cs_spinlock); in command_submission_show()
161 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in command_submission_jobs_show() local
165 spin_lock(&dev_entry->cs_job_spinlock); in command_submission_jobs_show()
167 list_for_each_entry(job, &dev_entry->cs_job_list, debugfs_list) { in command_submission_jobs_show()
185 spin_unlock(&dev_entry->cs_job_spinlock); in command_submission_jobs_show()
196 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in userptr_show() local
202 spin_lock(&dev_entry->userptr_spinlock); in userptr_show()
204 list_for_each_entry(userptr, &dev_entry->userptr_list, debugfs_list) { in userptr_show()
216 spin_unlock(&dev_entry->userptr_spinlock); in userptr_show()
227 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in vm_show() local
238 if (!dev_entry->hdev->mmu_enable) in vm_show()
241 spin_lock(&dev_entry->ctx_mem_hash_spinlock); in vm_show()
243 list_for_each_entry(ctx, &dev_entry->ctx_mem_hash_list, debugfs_list) { in vm_show()
295 spin_unlock(&dev_entry->ctx_mem_hash_spinlock); in vm_show()
356 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in mmu_show() local
357 struct hl_device *hdev = dev_entry->hdev; in mmu_show()
365 virt_addr = dev_entry->mmu_addr; in mmu_show()
370 if (dev_entry->mmu_asid == HL_KERNEL_ASID_ID) in mmu_show()
425 dev_entry->mmu_asid, dev_entry->mmu_addr); in mmu_show()
465 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in mmu_write() local
466 struct hl_device *hdev = dev_entry->hdev; in mmu_write()
485 rc = kstrtouint(kbuf, 10, &dev_entry->mmu_asid); in mmu_write()
491 rc = kstrtoull(c+3, 16, &dev_entry->mmu_addr); in mmu_write()
506 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in engines_show() local
507 struct hl_device *hdev = dev_entry->hdev; in engines_show()
940 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_device() local
946 dev_entry->hdev = hdev; in hl_debugfs_add_device()
947 dev_entry->entry_arr = kmalloc_array(count, in hl_debugfs_add_device()
950 if (!dev_entry->entry_arr) in hl_debugfs_add_device()
953 INIT_LIST_HEAD(&dev_entry->file_list); in hl_debugfs_add_device()
954 INIT_LIST_HEAD(&dev_entry->cb_list); in hl_debugfs_add_device()
955 INIT_LIST_HEAD(&dev_entry->cs_list); in hl_debugfs_add_device()
956 INIT_LIST_HEAD(&dev_entry->cs_job_list); in hl_debugfs_add_device()
957 INIT_LIST_HEAD(&dev_entry->userptr_list); in hl_debugfs_add_device()
958 INIT_LIST_HEAD(&dev_entry->ctx_mem_hash_list); in hl_debugfs_add_device()
959 mutex_init(&dev_entry->file_mutex); in hl_debugfs_add_device()
960 spin_lock_init(&dev_entry->cb_spinlock); in hl_debugfs_add_device()
961 spin_lock_init(&dev_entry->cs_spinlock); in hl_debugfs_add_device()
962 spin_lock_init(&dev_entry->cs_job_spinlock); in hl_debugfs_add_device()
963 spin_lock_init(&dev_entry->userptr_spinlock); in hl_debugfs_add_device()
964 spin_lock_init(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_device()
966 dev_entry->root = debugfs_create_dir(dev_name(hdev->dev), in hl_debugfs_add_device()
971 dev_entry->root, in hl_debugfs_add_device()
972 &dev_entry->addr); in hl_debugfs_add_device()
976 dev_entry->root, in hl_debugfs_add_device()
977 dev_entry, in hl_debugfs_add_device()
982 dev_entry->root, in hl_debugfs_add_device()
983 dev_entry, in hl_debugfs_add_device()
988 dev_entry->root, in hl_debugfs_add_device()
989 &dev_entry->i2c_bus); in hl_debugfs_add_device()
993 dev_entry->root, in hl_debugfs_add_device()
994 &dev_entry->i2c_addr); in hl_debugfs_add_device()
998 dev_entry->root, in hl_debugfs_add_device()
999 &dev_entry->i2c_reg); in hl_debugfs_add_device()
1003 dev_entry->root, in hl_debugfs_add_device()
1004 dev_entry, in hl_debugfs_add_device()
1009 dev_entry->root, in hl_debugfs_add_device()
1010 dev_entry, in hl_debugfs_add_device()
1015 dev_entry->root, in hl_debugfs_add_device()
1016 dev_entry, in hl_debugfs_add_device()
1021 dev_entry->root, in hl_debugfs_add_device()
1022 dev_entry, in hl_debugfs_add_device()
1027 dev_entry->root, in hl_debugfs_add_device()
1028 dev_entry, in hl_debugfs_add_device()
1031 for (i = 0, entry = dev_entry->entry_arr ; i < count ; i++, entry++) { in hl_debugfs_add_device()
1035 dev_entry->root, in hl_debugfs_add_device()
1040 entry->dev_entry = dev_entry; in hl_debugfs_add_device()
1056 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs; in hl_debugfs_add_file() local
1058 mutex_lock(&dev_entry->file_mutex); in hl_debugfs_add_file()
1059 list_add(&hpriv->debugfs_list, &dev_entry->file_list); in hl_debugfs_add_file()
1060 mutex_unlock(&dev_entry->file_mutex); in hl_debugfs_add_file()
1065 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs; in hl_debugfs_remove_file() local
1067 mutex_lock(&dev_entry->file_mutex); in hl_debugfs_remove_file()
1069 mutex_unlock(&dev_entry->file_mutex); in hl_debugfs_remove_file()
1074 struct hl_dbg_device_entry *dev_entry = &cb->hdev->hl_debugfs; in hl_debugfs_add_cb() local
1076 spin_lock(&dev_entry->cb_spinlock); in hl_debugfs_add_cb()
1077 list_add(&cb->debugfs_list, &dev_entry->cb_list); in hl_debugfs_add_cb()
1078 spin_unlock(&dev_entry->cb_spinlock); in hl_debugfs_add_cb()
1083 struct hl_dbg_device_entry *dev_entry = &cb->hdev->hl_debugfs; in hl_debugfs_remove_cb() local
1085 spin_lock(&dev_entry->cb_spinlock); in hl_debugfs_remove_cb()
1087 spin_unlock(&dev_entry->cb_spinlock); in hl_debugfs_remove_cb()
1092 struct hl_dbg_device_entry *dev_entry = &cs->ctx->hdev->hl_debugfs; in hl_debugfs_add_cs() local
1094 spin_lock(&dev_entry->cs_spinlock); in hl_debugfs_add_cs()
1095 list_add(&cs->debugfs_list, &dev_entry->cs_list); in hl_debugfs_add_cs()
1096 spin_unlock(&dev_entry->cs_spinlock); in hl_debugfs_add_cs()
1101 struct hl_dbg_device_entry *dev_entry = &cs->ctx->hdev->hl_debugfs; in hl_debugfs_remove_cs() local
1103 spin_lock(&dev_entry->cs_spinlock); in hl_debugfs_remove_cs()
1105 spin_unlock(&dev_entry->cs_spinlock); in hl_debugfs_remove_cs()
1110 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_job() local
1112 spin_lock(&dev_entry->cs_job_spinlock); in hl_debugfs_add_job()
1113 list_add(&job->debugfs_list, &dev_entry->cs_job_list); in hl_debugfs_add_job()
1114 spin_unlock(&dev_entry->cs_job_spinlock); in hl_debugfs_add_job()
1119 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_job() local
1121 spin_lock(&dev_entry->cs_job_spinlock); in hl_debugfs_remove_job()
1123 spin_unlock(&dev_entry->cs_job_spinlock); in hl_debugfs_remove_job()
1128 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_userptr() local
1130 spin_lock(&dev_entry->userptr_spinlock); in hl_debugfs_add_userptr()
1131 list_add(&userptr->debugfs_list, &dev_entry->userptr_list); in hl_debugfs_add_userptr()
1132 spin_unlock(&dev_entry->userptr_spinlock); in hl_debugfs_add_userptr()
1138 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_userptr() local
1140 spin_lock(&dev_entry->userptr_spinlock); in hl_debugfs_remove_userptr()
1142 spin_unlock(&dev_entry->userptr_spinlock); in hl_debugfs_remove_userptr()
1147 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_ctx_mem_hash() local
1149 spin_lock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_ctx_mem_hash()
1150 list_add(&ctx->debugfs_list, &dev_entry->ctx_mem_hash_list); in hl_debugfs_add_ctx_mem_hash()
1151 spin_unlock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_ctx_mem_hash()
1156 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_ctx_mem_hash() local
1158 spin_lock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_remove_ctx_mem_hash()
1160 spin_unlock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_remove_ctx_mem_hash()