mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
accel/habanalabs: get reset type indication from irq_map
When getting an event, add the ability to deduce the reset type from the IRQ map table instead of using hard reset regardless. Signed-off-by: Ohad Sharabi <osharabi@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org> Reviewed-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
This commit is contained in:
parent
18d1358459
commit
32231b6c30
2 changed files with 2661 additions and 2649 deletions
|
@ -9010,7 +9010,7 @@ static void gaudi2_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_ent
|
|||
{
|
||||
struct gaudi2_device *gaudi2 = hdev->asic_specific;
|
||||
bool reset_required = false, is_critical = false;
|
||||
u32 index, ctl, reset_flags = HL_DRV_RESET_HARD, error_count = 0;
|
||||
u32 index, ctl, reset_flags = 0, error_count = 0;
|
||||
u64 event_mask = 0;
|
||||
u16 event_type;
|
||||
|
||||
|
@ -9428,10 +9428,16 @@ static void gaudi2_handle_eqe(struct hl_device *hdev, struct hl_eq_entry *eq_ent
|
|||
gaudi2_print_event(hdev, event_type, true,
|
||||
"No error cause for H/W event %u\n", event_type);
|
||||
|
||||
if ((gaudi2_irq_map_table[event_type].reset || reset_required) &&
|
||||
(hdev->hard_reset_on_fw_events ||
|
||||
(hdev->asic_prop.fw_security_enabled && is_critical)))
|
||||
goto reset_device;
|
||||
if ((gaudi2_irq_map_table[event_type].reset != EVENT_RESET_TYPE_NONE) ||
|
||||
reset_required) {
|
||||
if (reset_required ||
|
||||
(gaudi2_irq_map_table[event_type].reset == EVENT_RESET_TYPE_HARD))
|
||||
reset_flags |= HL_DRV_RESET_HARD;
|
||||
|
||||
if (hdev->hard_reset_on_fw_events ||
|
||||
(hdev->asic_prop.fw_security_enabled && is_critical))
|
||||
goto reset_device;
|
||||
}
|
||||
|
||||
/* Send unmask irq only for interrupts not classified as MSG */
|
||||
if (!gaudi2_irq_map_table[event_type].msg)
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue