From: Oded Gabbay <ogabbay@kernel.org>
To: dri-devel@lists.freedesktop.org
Cc: Dani Liberman <dliberman@habana.ai>
Subject: [PATCH 08/12] accel/habanalabs: handle arc farm razwi
Date: Thu, 8 Jun 2023 16:38:45 +0300 [thread overview]
Message-ID: <20230608133849.2739411-8-ogabbay@kernel.org> (raw)
In-Reply-To: <20230608133849.2739411-1-ogabbay@kernel.org>
From: Dani Liberman <dliberman@habana.ai>
Implement razwi handling for arc farm and add it to arc farm sei
event handler.
Signed-off-by: Dani Liberman <dliberman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
---
drivers/accel/habanalabs/gaudi2/gaudi2.c | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/accel/habanalabs/gaudi2/gaudi2.c b/drivers/accel/habanalabs/gaudi2/gaudi2.c
index 899b1c4b53f6..1085215ac51d 100644
--- a/drivers/accel/habanalabs/gaudi2/gaudi2.c
+++ b/drivers/accel/habanalabs/gaudi2/gaudi2.c
@@ -2097,7 +2097,8 @@ enum razwi_event_sources {
RAZWI_PDMA,
RAZWI_NIC,
RAZWI_DEC,
- RAZWI_ROT
+ RAZWI_ROT,
+ RAZWI_ARC_FARM
};
struct hbm_mc_error_causes {
@@ -8049,6 +8050,9 @@ static enum gaudi2_engine_id gaudi2_razwi_calc_engine_id(struct hl_device *hdev,
case RAZWI_ROT:
return GAUDI2_ENGINE_ID_ROT_0 + module_idx;
+ case RAZWI_ARC_FARM:
+ return GAUDI2_ENGINE_ID_ARC_FARM;
+
default:
return GAUDI2_ENGINE_ID_SIZE;
}
@@ -8158,6 +8162,11 @@ static void gaudi2_ack_module_razwi_event_handler(struct hl_device *hdev,
lbw_rtr_id = gaudi2_rot_initiator_lbw_rtr_id[module_idx];
sprintf(initiator_name, "ROT_%u", module_idx);
break;
+ case RAZWI_ARC_FARM:
+ lbw_rtr_id = DCORE1_RTR5;
+ hbw_rtr_id = DCORE1_RTR7;
+ sprintf(initiator_name, "ARC_FARM_%u", module_idx);
+ break;
default:
return;
}
@@ -8611,7 +8620,7 @@ static int gaudi2_handle_qman_err(struct hl_device *hdev, u16 event_type, u64 *e
return error_count;
}
-static int gaudi2_handle_arc_farm_sei_err(struct hl_device *hdev, u16 event_type)
+static int gaudi2_handle_arc_farm_sei_err(struct hl_device *hdev, u16 event_type, u64 *event_mask)
{
u32 i, sts_val, sts_clr_val, error_count = 0, arc_farm;
@@ -8633,6 +8642,7 @@ static int gaudi2_handle_arc_farm_sei_err(struct hl_device *hdev, u16 event_type
sts_clr_val);
}
+ gaudi2_ack_module_razwi_event_handler(hdev, RAZWI_ARC_FARM, 0, 0, event_mask);
hl_check_for_glbl_errors(hdev);
return error_count;
@@ -9619,7 +9629,7 @@ static void gaudi2_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_ent
break;
case GAUDI2_EVENT_ARC_AXI_ERROR_RESPONSE_0:
- error_count = gaudi2_handle_arc_farm_sei_err(hdev, event_type);
+ error_count = gaudi2_handle_arc_farm_sei_err(hdev, event_type, &event_mask);
event_mask |= HL_NOTIFIER_EVENT_USER_ENGINE_ERR;
break;
--
2.40.1
next prev parent reply other threads:[~2023-06-08 13:39 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-08 13:38 [PATCH 01/12] accel/habanalabs: prevent immediate hard reset due to 2 adjacent H/W events Oded Gabbay
2023-06-08 13:38 ` [PATCH 02/12] accel/habanalabs: update pending reset flags with new reset requests Oded Gabbay
2023-06-08 13:38 ` [PATCH 03/12] accel/habanalabs: notify user about undefined opcode event Oded Gabbay
2023-06-08 13:38 ` [PATCH 04/12] accel/habanalabs: print task name and request code upon ioctl failure Oded Gabbay
2023-06-08 13:38 ` [PATCH 05/12] accel/habanalabs: print task name upon creation of a user context Oded Gabbay
2023-06-08 13:38 ` [PATCH 06/12] accel/habanalabs: set device status 'malfunction' while in rmmod Oded Gabbay
2023-06-08 13:38 ` [PATCH 07/12] accel/habanalabs: stop fetching MME SBTE error cause Oded Gabbay
2023-06-08 13:38 ` Oded Gabbay [this message]
2023-06-08 13:38 ` [PATCH 09/12] accel/habanalabs: fix standalone preboot descriptor request Oded Gabbay
2023-06-08 13:38 ` [PATCH 10/12] accel/habanalabs: print return code when process termination fails Oded Gabbay
2023-06-08 13:38 ` [PATCH 11/12] accel/habanalabs: call put_pid after hpriv list is updated Oded Gabbay
2023-06-08 13:38 ` [PATCH 12/12] accel/habanalabs: rename fd_list to hpriv_list 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=20230608133849.2739411-8-ogabbay@kernel.org \
--to=ogabbay@kernel.org \
--cc=dliberman@habana.ai \
--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