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()
1205 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_device() local
1211 dev_entry->hdev = hdev; in hl_debugfs_add_device()
1212 dev_entry->entry_arr = kmalloc_array(count, in hl_debugfs_add_device()
1215 if (!dev_entry->entry_arr) in hl_debugfs_add_device()
1218 INIT_LIST_HEAD(&dev_entry->file_list); in hl_debugfs_add_device()
1219 INIT_LIST_HEAD(&dev_entry->cb_list); in hl_debugfs_add_device()
1220 INIT_LIST_HEAD(&dev_entry->cs_list); in hl_debugfs_add_device()
1221 INIT_LIST_HEAD(&dev_entry->cs_job_list); in hl_debugfs_add_device()
1222 INIT_LIST_HEAD(&dev_entry->userptr_list); in hl_debugfs_add_device()
1223 INIT_LIST_HEAD(&dev_entry->ctx_mem_hash_list); in hl_debugfs_add_device()
1224 mutex_init(&dev_entry->file_mutex); in hl_debugfs_add_device()
1225 spin_lock_init(&dev_entry->cb_spinlock); in hl_debugfs_add_device()
1226 spin_lock_init(&dev_entry->cs_spinlock); in hl_debugfs_add_device()
1227 spin_lock_init(&dev_entry->cs_job_spinlock); in hl_debugfs_add_device()
1228 spin_lock_init(&dev_entry->userptr_spinlock); in hl_debugfs_add_device()
1229 spin_lock_init(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_device()
1231 dev_entry->root = debugfs_create_dir(dev_name(hdev->dev), in hl_debugfs_add_device()
1236 dev_entry->root, in hl_debugfs_add_device()
1237 &dev_entry->addr); in hl_debugfs_add_device()
1241 dev_entry->root, in hl_debugfs_add_device()
1242 dev_entry, in hl_debugfs_add_device()
1247 dev_entry->root, in hl_debugfs_add_device()
1248 dev_entry, in hl_debugfs_add_device()
1253 dev_entry->root, in hl_debugfs_add_device()
1254 dev_entry, in hl_debugfs_add_device()
1259 dev_entry->root, in hl_debugfs_add_device()
1260 &dev_entry->i2c_bus); in hl_debugfs_add_device()
1264 dev_entry->root, in hl_debugfs_add_device()
1265 &dev_entry->i2c_addr); in hl_debugfs_add_device()
1269 dev_entry->root, in hl_debugfs_add_device()
1270 &dev_entry->i2c_reg); in hl_debugfs_add_device()
1274 dev_entry->root, in hl_debugfs_add_device()
1275 dev_entry, in hl_debugfs_add_device()
1280 dev_entry->root, in hl_debugfs_add_device()
1281 dev_entry, in hl_debugfs_add_device()
1286 dev_entry->root, in hl_debugfs_add_device()
1287 dev_entry, in hl_debugfs_add_device()
1292 dev_entry->root, in hl_debugfs_add_device()
1293 dev_entry, in hl_debugfs_add_device()
1298 dev_entry->root, in hl_debugfs_add_device()
1299 dev_entry, in hl_debugfs_add_device()
1304 dev_entry->root, in hl_debugfs_add_device()
1305 dev_entry, in hl_debugfs_add_device()
1310 dev_entry->root, in hl_debugfs_add_device()
1311 dev_entry, in hl_debugfs_add_device()
1314 for (i = 0, entry = dev_entry->entry_arr ; i < count ; i++, entry++) { in hl_debugfs_add_device()
1318 dev_entry->root, in hl_debugfs_add_device()
1323 entry->dev_entry = dev_entry; in hl_debugfs_add_device()
1339 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs; in hl_debugfs_add_file() local
1341 mutex_lock(&dev_entry->file_mutex); in hl_debugfs_add_file()
1342 list_add(&hpriv->debugfs_list, &dev_entry->file_list); in hl_debugfs_add_file()
1343 mutex_unlock(&dev_entry->file_mutex); in hl_debugfs_add_file()
1348 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs; in hl_debugfs_remove_file() local
1350 mutex_lock(&dev_entry->file_mutex); in hl_debugfs_remove_file()
1352 mutex_unlock(&dev_entry->file_mutex); in hl_debugfs_remove_file()
1357 struct hl_dbg_device_entry *dev_entry = &cb->hdev->hl_debugfs; in hl_debugfs_add_cb() local
1359 spin_lock(&dev_entry->cb_spinlock); in hl_debugfs_add_cb()
1360 list_add(&cb->debugfs_list, &dev_entry->cb_list); in hl_debugfs_add_cb()
1361 spin_unlock(&dev_entry->cb_spinlock); in hl_debugfs_add_cb()
1366 struct hl_dbg_device_entry *dev_entry = &cb->hdev->hl_debugfs; in hl_debugfs_remove_cb() local
1368 spin_lock(&dev_entry->cb_spinlock); in hl_debugfs_remove_cb()
1370 spin_unlock(&dev_entry->cb_spinlock); in hl_debugfs_remove_cb()
1375 struct hl_dbg_device_entry *dev_entry = &cs->ctx->hdev->hl_debugfs; in hl_debugfs_add_cs() local
1377 spin_lock(&dev_entry->cs_spinlock); in hl_debugfs_add_cs()
1378 list_add(&cs->debugfs_list, &dev_entry->cs_list); in hl_debugfs_add_cs()
1379 spin_unlock(&dev_entry->cs_spinlock); in hl_debugfs_add_cs()
1384 struct hl_dbg_device_entry *dev_entry = &cs->ctx->hdev->hl_debugfs; in hl_debugfs_remove_cs() local
1386 spin_lock(&dev_entry->cs_spinlock); in hl_debugfs_remove_cs()
1388 spin_unlock(&dev_entry->cs_spinlock); in hl_debugfs_remove_cs()
1393 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_job() local
1395 spin_lock(&dev_entry->cs_job_spinlock); in hl_debugfs_add_job()
1396 list_add(&job->debugfs_list, &dev_entry->cs_job_list); in hl_debugfs_add_job()
1397 spin_unlock(&dev_entry->cs_job_spinlock); in hl_debugfs_add_job()
1402 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_job() local
1404 spin_lock(&dev_entry->cs_job_spinlock); in hl_debugfs_remove_job()
1406 spin_unlock(&dev_entry->cs_job_spinlock); in hl_debugfs_remove_job()
1411 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_userptr() local
1413 spin_lock(&dev_entry->userptr_spinlock); in hl_debugfs_add_userptr()
1414 list_add(&userptr->debugfs_list, &dev_entry->userptr_list); in hl_debugfs_add_userptr()
1415 spin_unlock(&dev_entry->userptr_spinlock); in hl_debugfs_add_userptr()
1421 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_userptr() local
1423 spin_lock(&dev_entry->userptr_spinlock); in hl_debugfs_remove_userptr()
1425 spin_unlock(&dev_entry->userptr_spinlock); in hl_debugfs_remove_userptr()
1430 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_add_ctx_mem_hash() local
1432 spin_lock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_ctx_mem_hash()
1433 list_add(&ctx->debugfs_list, &dev_entry->ctx_mem_hash_list); in hl_debugfs_add_ctx_mem_hash()
1434 spin_unlock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_add_ctx_mem_hash()
1439 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs; in hl_debugfs_remove_ctx_mem_hash() local
1441 spin_lock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_remove_ctx_mem_hash()
1443 spin_unlock(&dev_entry->ctx_mem_hash_spinlock); in hl_debugfs_remove_ctx_mem_hash()