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()
376 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in mmu_show() local
377 struct hl_device *hdev = dev_entry->hdev; in mmu_show()
389 virt_addr = dev_entry->mmu_addr; in mmu_show()
394 if (dev_entry->mmu_asid == HL_KERNEL_ASID_ID) in mmu_show()
486 dev_entry->mmu_asid, dev_entry->mmu_addr); in mmu_show()
538 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in mmu_asid_va_write() local
539 struct hl_device *hdev = dev_entry->hdev; in mmu_asid_va_write()
558 rc = kstrtouint(kbuf, 10, &dev_entry->mmu_asid); in mmu_asid_va_write()
564 rc = kstrtoull(c+3, 16, &dev_entry->mmu_addr); in mmu_asid_va_write()
579 struct hl_dbg_device_entry *dev_entry = entry->dev_entry; in engines_show() local
580 struct hl_device *hdev = dev_entry->hdev; in engines_show()
1207 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_device() local
1213 dev_entry->hdev = hdev; in hl_debugfs_add_device()
1214 dev_entry->entry_arr = kmalloc_array(count, in hl_debugfs_add_device()
1217 if (!dev_entry->entry_arr) in hl_debugfs_add_device()
1220 INIT_LIST_HEAD(&dev_entry->file_list); in hl_debugfs_add_device()
1221 INIT_LIST_HEAD(&dev_entry->cb_list); in hl_debugfs_add_device()
1222 INIT_LIST_HEAD(&dev_entry->cs_list); in hl_debugfs_add_device()
1223 INIT_LIST_HEAD(&dev_entry->cs_job_list); in hl_debugfs_add_device()
1224 INIT_LIST_HEAD(&dev_entry->userptr_list); in hl_debugfs_add_device()
1225 INIT_LIST_HEAD(&dev_entry->ctx_mem_hash_list); in hl_debugfs_add_device()
1226 mutex_init(&dev_entry->file_mutex); in hl_debugfs_add_device()
1227 spin_lock_init(&dev_entry->cb_spinlock); in hl_debugfs_add_device()
1228 spin_lock_init(&dev_entry->cs_spinlock); in hl_debugfs_add_device()
1229 spin_lock_init(&dev_entry->cs_job_spinlock); in hl_debugfs_add_device()
1230 spin_lock_init(&dev_entry->userptr_spinlock); in hl_debugfs_add_device()
1231 spin_lock_init(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_device()
1233 dev_entry->root = debugfs_create_dir(dev_name(hdev->dev), in hl_debugfs_add_device()
1238 dev_entry->root, in hl_debugfs_add_device()
1239 &dev_entry->addr); in hl_debugfs_add_device()
1243 dev_entry->root, in hl_debugfs_add_device()
1244 dev_entry, in hl_debugfs_add_device()
1249 dev_entry->root, in hl_debugfs_add_device()
1250 dev_entry, in hl_debugfs_add_device()
1255 dev_entry->root, in hl_debugfs_add_device()
1256 dev_entry, in hl_debugfs_add_device()
1261 dev_entry->root, in hl_debugfs_add_device()
1262 &dev_entry->i2c_bus); in hl_debugfs_add_device()
1266 dev_entry->root, in hl_debugfs_add_device()
1267 &dev_entry->i2c_addr); in hl_debugfs_add_device()
1271 dev_entry->root, in hl_debugfs_add_device()
1272 &dev_entry->i2c_reg); in hl_debugfs_add_device()
1276 dev_entry->root, in hl_debugfs_add_device()
1277 dev_entry, in hl_debugfs_add_device()
1282 dev_entry->root, in hl_debugfs_add_device()
1283 dev_entry, in hl_debugfs_add_device()
1288 dev_entry->root, in hl_debugfs_add_device()
1289 dev_entry, in hl_debugfs_add_device()
1294 dev_entry->root, in hl_debugfs_add_device()
1295 dev_entry, in hl_debugfs_add_device()
1300 dev_entry->root, in hl_debugfs_add_device()
1301 dev_entry, in hl_debugfs_add_device()
1306 dev_entry->root, in hl_debugfs_add_device()
1307 dev_entry, in hl_debugfs_add_device()
1312 dev_entry->root, in hl_debugfs_add_device()
1313 dev_entry, in hl_debugfs_add_device()
1316 for (i = 0, entry = dev_entry->entry_arr ; i < count ; i++, entry++) { in hl_debugfs_add_device()
1320 dev_entry->root, in hl_debugfs_add_device()
1325 entry->dev_entry = dev_entry; in hl_debugfs_add_device()
1341 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs; in hl_debugfs_add_file() local
1343 mutex_lock(&dev_entry->file_mutex); in hl_debugfs_add_file()
1344 list_add(&hpriv->debugfs_list, &dev_entry->file_list); in hl_debugfs_add_file()
1345 mutex_unlock(&dev_entry->file_mutex); in hl_debugfs_add_file()
1350 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs; in hl_debugfs_remove_file() local
1352 mutex_lock(&dev_entry->file_mutex); in hl_debugfs_remove_file()
1354 mutex_unlock(&dev_entry->file_mutex); in hl_debugfs_remove_file()
1359 struct hl_dbg_device_entry *dev_entry = &cb->hdev->hl_debugfs; in hl_debugfs_add_cb() local
1361 spin_lock(&dev_entry->cb_spinlock); in hl_debugfs_add_cb()
1362 list_add(&cb->debugfs_list, &dev_entry->cb_list); in hl_debugfs_add_cb()
1363 spin_unlock(&dev_entry->cb_spinlock); in hl_debugfs_add_cb()
1368 struct hl_dbg_device_entry *dev_entry = &cb->hdev->hl_debugfs; in hl_debugfs_remove_cb() local
1370 spin_lock(&dev_entry->cb_spinlock); in hl_debugfs_remove_cb()
1372 spin_unlock(&dev_entry->cb_spinlock); in hl_debugfs_remove_cb()
1377 struct hl_dbg_device_entry *dev_entry = &cs->ctx->hdev->hl_debugfs; in hl_debugfs_add_cs() local
1379 spin_lock(&dev_entry->cs_spinlock); in hl_debugfs_add_cs()
1380 list_add(&cs->debugfs_list, &dev_entry->cs_list); in hl_debugfs_add_cs()
1381 spin_unlock(&dev_entry->cs_spinlock); in hl_debugfs_add_cs()
1386 struct hl_dbg_device_entry *dev_entry = &cs->ctx->hdev->hl_debugfs; in hl_debugfs_remove_cs() local
1388 spin_lock(&dev_entry->cs_spinlock); in hl_debugfs_remove_cs()
1390 spin_unlock(&dev_entry->cs_spinlock); in hl_debugfs_remove_cs()
1395 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_job() local
1397 spin_lock(&dev_entry->cs_job_spinlock); in hl_debugfs_add_job()
1398 list_add(&job->debugfs_list, &dev_entry->cs_job_list); in hl_debugfs_add_job()
1399 spin_unlock(&dev_entry->cs_job_spinlock); in hl_debugfs_add_job()
1404 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_job() local
1406 spin_lock(&dev_entry->cs_job_spinlock); in hl_debugfs_remove_job()
1408 spin_unlock(&dev_entry->cs_job_spinlock); in hl_debugfs_remove_job()
1413 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_userptr() local
1415 spin_lock(&dev_entry->userptr_spinlock); in hl_debugfs_add_userptr()
1416 list_add(&userptr->debugfs_list, &dev_entry->userptr_list); in hl_debugfs_add_userptr()
1417 spin_unlock(&dev_entry->userptr_spinlock); in hl_debugfs_add_userptr()
1423 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_userptr() local
1425 spin_lock(&dev_entry->userptr_spinlock); in hl_debugfs_remove_userptr()
1427 spin_unlock(&dev_entry->userptr_spinlock); in hl_debugfs_remove_userptr()
1432 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_ctx_mem_hash() local
1434 spin_lock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_ctx_mem_hash()
1435 list_add(&ctx->debugfs_list, &dev_entry->ctx_mem_hash_list); in hl_debugfs_add_ctx_mem_hash()
1436 spin_unlock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_ctx_mem_hash()
1441 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_ctx_mem_hash() local
1443 spin_lock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_remove_ctx_mem_hash()
1445 spin_unlock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_remove_ctx_mem_hash()