mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
accel/habanalabs: print task name upon creation of a user context
It is useful for debug to know which user process have acquired the device. Add this info to the relevant debug print, in addition to the already printed user context's ASID. Signed-off-by: Tomer Tayar <ttayar@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
7dccb064a7
commit
e7b2902a33
1 changed files with 4 additions and 2 deletions
|
@ -102,7 +102,7 @@ static void hl_ctx_fini(struct hl_ctx *ctx)
|
|||
kfree(ctx->cs_pending);
|
||||
|
||||
if (ctx->asid != HL_KERNEL_ASID_ID) {
|
||||
dev_dbg(hdev->dev, "closing user context %d\n", ctx->asid);
|
||||
dev_dbg(hdev->dev, "closing user context, asid=%u\n", ctx->asid);
|
||||
|
||||
/* The engines are stopped as there is no executing CS, but the
|
||||
* Coresight might be still working by accessing addresses
|
||||
|
@ -198,6 +198,7 @@ int hl_ctx_create(struct hl_device *hdev, struct hl_fpriv *hpriv)
|
|||
|
||||
int hl_ctx_init(struct hl_device *hdev, struct hl_ctx *ctx, bool is_kernel_ctx)
|
||||
{
|
||||
char task_comm[TASK_COMM_LEN];
|
||||
int rc = 0, i;
|
||||
|
||||
ctx->hdev = hdev;
|
||||
|
@ -267,7 +268,8 @@ int hl_ctx_init(struct hl_device *hdev, struct hl_ctx *ctx, bool is_kernel_ctx)
|
|||
|
||||
hl_encaps_sig_mgr_init(&ctx->sig_mgr);
|
||||
|
||||
dev_dbg(hdev->dev, "create user context %d\n", ctx->asid);
|
||||
dev_dbg(hdev->dev, "create user context, comm=\"%s\", asid=%u\n",
|
||||
get_task_comm(task_comm, current), ctx->asid);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue