From: Oded Gabbay <ogabbay@kernel.org>
To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Cc: Dafna Hirschfeld <dhirschfeld@habana.ai>
Subject: [PATCH 05/10] accel/habanalabs/gaudi2: fix undef opcode reporting
Date: Wed, 15 Nov 2023 18:39:07 +0200 [thread overview]
Message-ID: <20231115163912.1243175-5-ogabbay@kernel.org> (raw)
In-Reply-To: <20231115163912.1243175-1-ogabbay@kernel.org>
From: Dafna Hirschfeld <dhirschfeld@habana.ai>
currently the undefined opcode event bit in set only for lower cp and
only if 'write_enable' is true. It should be set anyway and for all
streams in order to report that event to userspace.
Signed-off-by: Dafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
drivers/accel/habanalabs/gaudi2/gaudi2.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
index b739078c2d87..5075f92d15cc 100644
--- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
+++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
@@ -7929,21 +7929,19 @@ static int gaudi2_handle_qman_err_generic(struct hl_device *hdev, u16 event_type
error_count++;
}
- if (i == QMAN_STREAMS && error_count) {
- /* check for undefined opcode */
- if (glbl_sts_val & PDMA0_QM_GLBL_ERR_STS_CP_UNDEF_CMD_ERR_MASK &&
- hdev->captured_err_info.undef_opcode.write_enable) {
+ /* check for undefined opcode */
+ if (glbl_sts_val & PDMA0_QM_GLBL_ERR_STS_CP_UNDEF_CMD_ERR_MASK) {
+ *event_mask |= HL_NOTIFIER_EVENT_UNDEFINED_OPCODE;
+ if (hdev->captured_err_info.undef_opcode.write_enable) {
memset(&hdev->captured_err_info.undef_opcode, 0,
sizeof(hdev->captured_err_info.undef_opcode));
-
- hdev->captured_err_info.undef_opcode.write_enable = false;
hdev->captured_err_info.undef_opcode.timestamp = ktime_get();
hdev->captured_err_info.undef_opcode.engine_id =
gaudi2_queue_id_to_engine_id[qid_base];
- *event_mask |= HL_NOTIFIER_EVENT_UNDEFINED_OPCODE;
}
- handle_lower_qman_data_on_err(hdev, qman_base, *event_mask);
+ if (i == QMAN_STREAMS)
+ handle_lower_qman_data_on_err(hdev, qman_base, *event_mask);
}
}
--
2.34.1
next prev parent reply other threads:[~2023-11-15 16:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 16:39 [PATCH 01/10] accel/habanalabs/gaudi2: assume hard-reset by FW upon PCIe AXI drain Oded Gabbay
2023-11-15 16:39 ` [PATCH 02/10] accel/habanalabs: add log when eq event is not received Oded Gabbay
2023-11-15 16:39 ` [PATCH 03/10] accel/habanalabs: add support for Gaudi2C device Oded Gabbay
2023-11-15 16:39 ` [PATCH 04/10] accel/habanalabs: fix EQ heartbeat mechanism Oded Gabbay
2023-11-15 16:39 ` Oded Gabbay [this message]
2023-11-15 16:39 ` [PATCH 06/10] accel/habanalabs: remove 'get temperature' debug print Oded Gabbay
2023-11-15 16:39 ` [PATCH 07/10] accel/habanalabs: set hard reset flag if graceful reset is skipped Oded Gabbay
2023-11-15 16:39 ` [PATCH 08/10] accel/habanalabs/gaudi2: get the correct QM CQ info upon an error Oded Gabbay
2023-11-15 16:39 ` [PATCH 09/10] accel/habanalabs: print error code when mapping fails Oded Gabbay
2023-11-15 16:39 ` [PATCH 10/10] accel/habanalabs: expose module id through sysfs 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=20231115163912.1243175-5-ogabbay@kernel.org \
--to=ogabbay@kernel.org \
--cc=dhirschfeld@habana.ai \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®