dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <ogabbay@kernel.org>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 04/12] accel/habanalabs/gaudi2: fix missing check of kernel ctx
Date: Tue, 11 Jul 2023 14:12:18 +0300	[thread overview]
Message-ID: <20230711111226.163670-4-ogabbay@kernel.org> (raw)
In-Reply-To: <20230711111226.163670-1-ogabbay@kernel.org>

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.

Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
 drivers/accel/habanalabs/gaudi2/gaudi2.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
index 0f9e9522233f..70b8f744cd73 100644
--- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
+++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
@@ -10650,6 +10650,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;
-- 
2.34.1


  parent reply	other threads:[~2023-07-11 11:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11 11:12 [PATCH 01/12] accel/habanalabs/gaudi2: un-secure register for engine cores interrupt Oded Gabbay
2023-07-11 11:12 ` [PATCH 02/12] accel/habanalabs/gaudi2: unsecure tpc count registers Oded Gabbay
2023-07-11 11:12 ` [PATCH 03/12] accel/habanalabs/gaudi2: prepare to remove soft_rst_irq Oded Gabbay
2023-07-11 11:12 ` Oded Gabbay [this message]
2023-07-12 11:58   ` [PATCH 04/12] accel/habanalabs/gaudi2: fix missing check of kernel ctx Ofir Bitton
2023-07-11 11:12 ` [PATCH 05/12] accel/habanalabs: handle f/w reserved dram space request Oded Gabbay
2023-07-11 11:12 ` [PATCH 06/12] accel/habanalabs: set default device release watchdog T/O as 30 sec Oded Gabbay
2023-07-11 11:12 ` [PATCH 07/12] accel/habanalabs: add info ioctl for engine error reports Oded Gabbay
2023-07-11 11:12 ` [PATCH 08/12] accel/habanalabs: register compute device as an accel device Oded Gabbay
2023-07-11 11:12 ` [PATCH 09/12] accel/habanalabs: update sysfs-driver-habanalabs with the accel path Oded Gabbay
2023-07-11 11:12 ` [PATCH 10/12] accel/habanalabs: update debugfs-driver-habanalabs " Oded Gabbay
2023-07-11 11:12 ` [PATCH 11/12] accel/habanalabs: Move ioctls to the device specific ioctls range Oded Gabbay
2023-07-11 11:12 ` [PATCH 12/12] accel/habanalabs: release user interfaces earlier in device fini Oded Gabbay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230711111226.163670-4-ogabbay@kernel.org \
    --to=ogabbay@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox