Commit a6cd2551 authored by Oded Gabbay's avatar Oded Gabbay

habanalabs: revise prints on FD close

The driver quietly handles memory mappings that were not freed so no
need to print a warning about that when user closes the FD.

Accordingly, revise the text that is printed in case the device is
still in use after the user process closed the FD.
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 7886acb6
...@@ -129,8 +129,8 @@ static int hl_device_release(struct inode *inode, struct file *filp) ...@@ -129,8 +129,8 @@ static int hl_device_release(struct inode *inode, struct file *filp)
hl_ctx_mgr_fini(hdev, &hpriv->ctx_mgr); hl_ctx_mgr_fini(hdev, &hpriv->ctx_mgr);
if (!hl_hpriv_put(hpriv)) if (!hl_hpriv_put(hpriv))
dev_warn(hdev->dev, dev_notice(hdev->dev,
"Device is still in use because there are live CS and/or memory mappings\n"); "User process closed FD but device still in use\n");
hdev->last_open_session_duration_jif = hdev->last_open_session_duration_jif =
jiffies - hdev->last_successful_open_jif; jiffies - hdev->last_successful_open_jif;
......
...@@ -2126,7 +2126,7 @@ void hl_vm_ctx_fini(struct hl_ctx *ctx) ...@@ -2126,7 +2126,7 @@ void hl_vm_ctx_fini(struct hl_ctx *ctx)
* another side effect error * another side effect error
*/ */
if (!hdev->hard_reset_pending && !hash_empty(ctx->mem_hash)) if (!hdev->hard_reset_pending && !hash_empty(ctx->mem_hash))
dev_notice(hdev->dev, dev_dbg(hdev->dev,
"user released device without removing its memory mappings\n"); "user released device without removing its memory mappings\n");
hash_for_each_safe(ctx->mem_hash, i, tmp_node, hnode, node) { hash_for_each_safe(ctx->mem_hash, i, tmp_node, hnode, node) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment