From: Oded Gabbay <oded.gabbay@gmail.com>
To: linux-kernel@vger.kernel.org, SW_Drivers@habana.ai
Cc: gregkh@linuxfoundation.org, Omer Shpigelman <oshpigelman@habana.ai>
Subject: [PATCH 2/4] habanalabs: add print for soft reset due to event
Date: Thu, 21 May 2020 10:02:03 +0300 [thread overview]
Message-ID: <20200521070205.26673-2-oded.gabbay@gmail.com> (raw)
In-Reply-To: <20200521070205.26673-1-oded.gabbay@gmail.com>
From: Omer Shpigelman <oshpigelman@habana.ai>
Print the event name that caused the soft reset.
Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
---
drivers/misc/habanalabs/gaudi/gaudi.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/habanalabs/gaudi/gaudi.c b/drivers/misc/habanalabs/gaudi/gaudi.c
index 093384731f0d..3d4a569914d3 100644
--- a/drivers/misc/habanalabs/gaudi/gaudi.c
+++ b/drivers/misc/habanalabs/gaudi/gaudi.c
@@ -5843,8 +5843,12 @@ static void gaudi_handle_eqe(struct hl_device *hdev,
soft_reset_required = gaudi_tpc_read_interrupts(hdev,
tpc_dec_event_to_tpc_id(event_type),
"AXI_SLV_DEC_Error");
- if (soft_reset_required)
+ if (soft_reset_required) {
+ dev_err_ratelimited(hdev->dev,
+ "soft reset required due to %s\n",
+ gaudi_irq_map_table[event_type].name);
hl_device_reset(hdev, false, false);
+ }
hl_fw_unmask_irq(hdev, event_type);
break;
@@ -5860,8 +5864,12 @@ static void gaudi_handle_eqe(struct hl_device *hdev,
soft_reset_required = gaudi_tpc_read_interrupts(hdev,
tpc_krn_event_to_tpc_id(event_type),
"KRN_ERR");
- if (soft_reset_required)
+ if (soft_reset_required) {
+ dev_err_ratelimited(hdev->dev,
+ "soft reset required due to %s\n",
+ gaudi_irq_map_table[event_type].name);
hl_device_reset(hdev, false, false);
+ }
hl_fw_unmask_irq(hdev, event_type);
break;
--
2.17.1
next prev parent reply other threads:[~2020-05-21 7:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-21 7:02 [PATCH 1/4] habanalabs: improve MMU cache invalidation code Oded Gabbay
2020-05-21 7:02 ` Oded Gabbay [this message]
2020-05-21 7:02 ` [PATCH 3/4] habanalabs: GAUDI does not support soft-reset Oded Gabbay
2020-05-21 7:41 ` Tomer Tayar
2020-05-21 7:02 ` [PATCH 4/4] habanalabs: don't allow hard reset with open processes 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=20200521070205.26673-2-oded.gabbay@gmail.com \
--to=oded.gabbay@gmail.com \
--cc=SW_Drivers@habana.ai \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=oshpigelman@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