mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
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: Ofir Bitton <obitton@habana.ai> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
This commit is contained in:
parent
15c0bb1623
commit
fa46c7bb50
1 changed files with 3 additions and 0 deletions
|
@ -10651,6 +10651,9 @@ static int gaudi2_ctx_init(struct hl_ctx *ctx)
|
|||
{
|
||||
int rc;
|
||||
|
||||
if (ctx->asid == HL_KERNEL_ASID_ID)
|
||||
return 0;
|
||||
|
||||
rc = gaudi2_mmu_prepare(ctx->hdev, ctx->asid);
|
||||
if (rc)
|
||||
return rc;
|
||||
|
|
Loading…
Reference in a new issue