diff options
author | Oded Gabbay <ogabbay@kernel.org> | 2021-11-30 17:04:13 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-12-26 08:59:08 +0200 |
commit | a4dd2ecf36c4458db14df3aae81ec3e3f4b4688e (patch) | |
tree | 00f7dd20bad2cf1fc29103eadf0ec4db5144cd8e /drivers/misc | |
parent | fee187fe460b6b72a62e7d7b7193f8d675752544 (diff) | |
download | linux-a4dd2ecf36c4458db14df3aae81ec3e3f4b4688e.tar.bz2 |
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: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/habanalabs/common/context.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/habanalabs/common/context.c b/drivers/misc/habanalabs/common/context.c index d0aaccd4df2c..4f7d39a29a42 100644 --- a/drivers/misc/habanalabs/common/context.c +++ b/drivers/misc/habanalabs/common/context.c @@ -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); |