Commit fa46c7bb authored by Oded Gabbay's avatar Oded Gabbay

accel/habanalabs/gaudi2: fix missing check of kernel ctx

If we are initializing the kernel context when we have a Gaudi2 device,
we don't need to do any late initializing of that context with
specific Gaudi2 code.
Reviewed-by: default avatarOfir Bitton <obitton@habana.ai>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
parent 15c0bb16
...@@ -10651,6 +10651,9 @@ static int gaudi2_ctx_init(struct hl_ctx *ctx) ...@@ -10651,6 +10651,9 @@ static int gaudi2_ctx_init(struct hl_ctx *ctx)
{ {
int rc; int rc;
if (ctx->asid == HL_KERNEL_ASID_ID)
return 0;
rc = gaudi2_mmu_prepare(ctx->hdev, ctx->asid); rc = gaudi2_mmu_prepare(ctx->hdev, ctx->asid);
if (rc) if (rc)
return rc; return rc;
......
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