summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/common/debugfs.c
diff options
context:
space:
mode:
authorTomer Tayar <ttayar@habana.ai>2020-08-02 22:51:31 +0300
committerOded Gabbay <ogabbay@kernel.org>2020-11-30 11:47:38 +0300
commitf07486745442f6118ede18e2b52ee7be69cde5a4 (patch)
tree0ae8178439b52b7afa1cd8d29045412687af2d50 /drivers/misc/habanalabs/common/debugfs.c
parent3e438b42a5fbf19e44c6c3e0481ed4b5672d8f42 (diff)
downloadlinux-f07486745442f6118ede18e2b52ee7be69cde5a4.tar.xz
habanalabs: Modify the cs_cnt of a CB to be atomic
Modify the CS counter of a CB to be atomic, so no locking is required when it is being modified or read. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/debugfs.c')
-rw-r--r--drivers/misc/habanalabs/common/debugfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/common/debugfs.c b/drivers/misc/habanalabs/common/debugfs.c
index b47a62da0b41..cef716643979 100644
--- a/drivers/misc/habanalabs/common/debugfs.c
+++ b/drivers/misc/habanalabs/common/debugfs.c
@@ -116,7 +116,7 @@ static int command_buffers_show(struct seq_file *s, void *data)
" %03llu %d 0x%08x %d %d %d\n",
cb->id, cb->ctx->asid, cb->size,
kref_read(&cb->refcount),
- cb->mmap, cb->cs_cnt);
+ cb->mmap, atomic_read(&cb->cs_cnt));
}
spin_unlock(&dev_entry->cb_spinlock);