Lines Matching refs:dev_entry

99 	struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
103 spin_lock(&dev_entry->cb_spinlock);
105 list_for_each_entry(cb, &dev_entry->cb_list, debugfs_list) {
119 spin_unlock(&dev_entry->cb_spinlock);
130 struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
134 spin_lock(&dev_entry->cs_spinlock);
136 list_for_each_entry(cs, &dev_entry->cs_list, debugfs_list) {
150 spin_unlock(&dev_entry->cs_spinlock);
161 struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
165 spin_lock(&dev_entry->cs_job_spinlock);
167 list_for_each_entry(job, &dev_entry->cs_job_list, debugfs_list) {
185 spin_unlock(&dev_entry->cs_job_spinlock);
196 struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
202 spin_lock(&dev_entry->userptr_spinlock);
204 list_for_each_entry(userptr, &dev_entry->userptr_list, debugfs_list) {
216 spin_unlock(&dev_entry->userptr_spinlock);
227 struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
238 if (!dev_entry->hdev->mmu_enable)
241 spin_lock(&dev_entry->ctx_mem_hash_spinlock);
243 list_for_each_entry(ctx, &dev_entry->ctx_mem_hash_list, debugfs_list) {
295 spin_unlock(&dev_entry->ctx_mem_hash_spinlock);
376 struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
377 struct hl_device *hdev = dev_entry->hdev;
389 virt_addr = dev_entry->mmu_addr;
394 if (dev_entry->mmu_asid == HL_KERNEL_ASID_ID)
486 dev_entry->mmu_asid, dev_entry->mmu_addr);
538 struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
539 struct hl_device *hdev = dev_entry->hdev;
558 rc = kstrtouint(kbuf, 10, &dev_entry->mmu_asid);
564 rc = kstrtoull(c+3, 16, &dev_entry->mmu_addr);
579 struct hl_dbg_device_entry *dev_entry = entry->dev_entry;
580 struct hl_device *hdev = dev_entry->hdev;
1207 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
1213 dev_entry->hdev = hdev;
1214 dev_entry->entry_arr = kmalloc_array(count,
1217 if (!dev_entry->entry_arr)
1220 INIT_LIST_HEAD(&dev_entry->file_list);
1221 INIT_LIST_HEAD(&dev_entry->cb_list);
1222 INIT_LIST_HEAD(&dev_entry->cs_list);
1223 INIT_LIST_HEAD(&dev_entry->cs_job_list);
1224 INIT_LIST_HEAD(&dev_entry->userptr_list);
1225 INIT_LIST_HEAD(&dev_entry->ctx_mem_hash_list);
1226 mutex_init(&dev_entry->file_mutex);
1227 spin_lock_init(&dev_entry->cb_spinlock);
1228 spin_lock_init(&dev_entry->cs_spinlock);
1229 spin_lock_init(&dev_entry->cs_job_spinlock);
1230 spin_lock_init(&dev_entry->userptr_spinlock);
1231 spin_lock_init(&dev_entry->ctx_mem_hash_spinlock);
1233 dev_entry->root = debugfs_create_dir(dev_name(hdev->dev),
1238 dev_entry->root,
1239 &dev_entry->addr);
1243 dev_entry->root,
1244 dev_entry,
1249 dev_entry->root,
1250 dev_entry,
1255 dev_entry->root,
1256 dev_entry,
1261 dev_entry->root,
1262 &dev_entry->i2c_bus);
1266 dev_entry->root,
1267 &dev_entry->i2c_addr);
1271 dev_entry->root,
1272 &dev_entry->i2c_reg);
1276 dev_entry->root,
1277 dev_entry,
1282 dev_entry->root,
1283 dev_entry,
1288 dev_entry->root,
1289 dev_entry,
1294 dev_entry->root,
1295 dev_entry,
1300 dev_entry->root,
1301 dev_entry,
1306 dev_entry->root,
1307 dev_entry,
1312 dev_entry->root,
1313 dev_entry,
1316 for (i = 0, entry = dev_entry->entry_arr ; i < count ; i++, entry++) {
1320 dev_entry->root,
1325 entry->dev_entry = dev_entry;
1341 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs;
1343 mutex_lock(&dev_entry->file_mutex);
1344 list_add(&hpriv->debugfs_list, &dev_entry->file_list);
1345 mutex_unlock(&dev_entry->file_mutex);
1350 struct hl_dbg_device_entry *dev_entry = &hpriv->hdev->hl_debugfs;
1352 mutex_lock(&dev_entry->file_mutex);
1354 mutex_unlock(&dev_entry->file_mutex);
1359 struct hl_dbg_device_entry *dev_entry = &cb->hdev->hl_debugfs;
1361 spin_lock(&dev_entry->cb_spinlock);
1362 list_add(&cb->debugfs_list, &dev_entry->cb_list);
1363 spin_unlock(&dev_entry->cb_spinlock);
1368 struct hl_dbg_device_entry *dev_entry = &cb->hdev->hl_debugfs;
1370 spin_lock(&dev_entry->cb_spinlock);
1372 spin_unlock(&dev_entry->cb_spinlock);
1377 struct hl_dbg_device_entry *dev_entry = &cs->ctx->hdev->hl_debugfs;
1379 spin_lock(&dev_entry->cs_spinlock);
1380 list_add(&cs->debugfs_list, &dev_entry->cs_list);
1381 spin_unlock(&dev_entry->cs_spinlock);
1386 struct hl_dbg_device_entry *dev_entry = &cs->ctx->hdev->hl_debugfs;
1388 spin_lock(&dev_entry->cs_spinlock);
1390 spin_unlock(&dev_entry->cs_spinlock);
1395 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
1397 spin_lock(&dev_entry->cs_job_spinlock);
1398 list_add(&job->debugfs_list, &dev_entry->cs_job_list);
1399 spin_unlock(&dev_entry->cs_job_spinlock);
1404 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
1406 spin_lock(&dev_entry->cs_job_spinlock);
1408 spin_unlock(&dev_entry->cs_job_spinlock);
1413 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
1415 spin_lock(&dev_entry->userptr_spinlock);
1416 list_add(&userptr->debugfs_list, &dev_entry->userptr_list);
1417 spin_unlock(&dev_entry->userptr_spinlock);
1423 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
1425 spin_lock(&dev_entry->userptr_spinlock);
1427 spin_unlock(&dev_entry->userptr_spinlock);
1432 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
1434 spin_lock(&dev_entry->ctx_mem_hash_spinlock);
1435 list_add(&ctx->debugfs_list, &dev_entry->ctx_mem_hash_list);
1436 spin_unlock(&dev_entry->ctx_mem_hash_spinlock);
1441 struct hl_dbg_device_entry *dev_entry = &hdev->hl_debugfs;
1443 spin_lock(&dev_entry->ctx_mem_hash_spinlock);
1445 spin_unlock(&dev_entry->ctx_mem_hash_spinlock);