habanalabs: remove redundant check on ctx_fini
authorOded Gabbay <ogabbay@kernel.org>
Tue, 30 Nov 2021 15:04:13 +0000 (17:04 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:08 +0000 (08:59 +0200)
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: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/context.c

index d0aaccd4df2cdd133f32e1e2a0818c9b596134f2..4f7d39a29a4291ab758e3a447f727089fbd72490 100644 (file)
@@ -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
                 * Coresight might be still working by accessing addresses
                 * 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);
 
                hdev->asic_funcs->ctx_fini(ctx);