Commit a4dd2ecf authored by Oded Gabbay's avatar Oded Gabbay

habanalabs: remove redundant check on ctx_fini

The driver supports only a single context. Therefore, no need to check
if the user context that is closed is the compute context. The user
context, if exists, is always the compute context.
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent fee187fe
...@@ -97,10 +97,8 @@ static void hl_ctx_fini(struct hl_ctx *ctx) ...@@ -97,10 +97,8 @@ static void hl_ctx_fini(struct hl_ctx *ctx)
/* The engines are stopped as there is no executing CS, but the /* The engines are stopped as there is no executing CS, but the
* Coresight might be still working by accessing addresses * Coresight might be still working by accessing addresses
* related to the stopped engines. Hence stop it explicitly. * related to the stopped engines. Hence stop it explicitly.
* Stop only if this is the compute context, as there can be
* only one compute context
*/ */
if ((hdev->in_debug) && (hdev->compute_ctx == ctx)) if (hdev->in_debug)
hl_device_set_debug_mode(hdev, false); hl_device_set_debug_mode(hdev, false);
hdev->asic_funcs->ctx_fini(ctx); hdev->asic_funcs->ctx_fini(ctx);
......
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