From: Oded Gabbay <ogabbay@kernel.org>
To: linux-kernel@vger.kernel.org
Cc: Ofir Bitton <obitton@habana.ai>
Subject: [PATCH 7/9] habanalabs/gaudi: allow device acquire while in debug mode
Date: Wed, 28 Dec 2022 18:07:21 +0200 [thread overview]
Message-ID: <20221228160723.387-7-ogabbay@kernel.org> (raw)
In-Reply-To: <20221228160723.387-1-ogabbay@kernel.org>
From: Ofir Bitton <obitton@habana.ai>
During device acquire, the driver is using a QMAN for clearing some
registers. In order to avoid internal races, the driver verifies
the device is idle before submitting the register clear job.
This check introduces an issue, as debug mode will cause the device
to be non-idle which will lead to device acquire failure.
In order to overcome this issue we can entirely remove the idle
check as the driver is using the QMAN only when there is no active
context.
Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
drivers/accel/habanalabs/gaudi/gaudi.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/accel/habanalabs/gaudi/gaudi.c b/drivers/accel/habanalabs/gaudi/gaudi.c
index 13f9e6c0cd90..733916f38752 100644
--- a/drivers/accel/habanalabs/gaudi/gaudi.c
+++ b/drivers/accel/habanalabs/gaudi/gaudi.c
@@ -6434,12 +6434,6 @@ static int gaudi_send_job_on_qman0(struct hl_device *hdev,
else
timeout = HL_DEVICE_TIMEOUT_USEC;
- if (!hdev->asic_funcs->is_device_idle(hdev, NULL, 0, NULL)) {
- dev_err_ratelimited(hdev->dev,
- "Can't send driver job on QMAN0 because the device is not idle\n");
- return -EBUSY;
- }
-
fence_ptr = hl_asic_dma_pool_zalloc(hdev, 4, GFP_KERNEL, &fence_dma_addr);
if (!fence_ptr) {
dev_err(hdev->dev,
--
2.34.1
next prev parent reply other threads:[~2022-12-28 16:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-28 16:07 [PATCH 1/9] habanalabs: add uapi to flush inbound HBM transactions Oded Gabbay
2022-12-28 16:07 ` [PATCH 2/9] habanalabs: verify that kernel CB is destroyed only once Oded Gabbay
2022-12-28 16:07 ` [PATCH 3/9] habanalabs/gaudi2: update asic register files Oded Gabbay
2022-12-28 16:07 ` [PATCH 4/9] habanalabs/gaudi2: update f/w files Oded Gabbay
2022-12-28 16:07 ` [PATCH 5/9] habanalabs: " Oded Gabbay
2022-12-28 16:07 ` [PATCH 6/9] habanalabs: move some prints to debug level Oded Gabbay
2022-12-28 16:07 ` Oded Gabbay [this message]
2022-12-28 16:07 ` [PATCH 8/9] habanalabs/gaudi2: avoid reconfiguring the same PB registers Oded Gabbay
2022-12-28 16:07 ` [PATCH 9/9] habanalabs: refactor razwi/page-fault information structures 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=20221228160723.387-7-ogabbay@kernel.org \
--to=ogabbay@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=obitton@habana.ai \
/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