Lines Matching refs:reset_info
379 } else if (hdev->reset_info.in_reset) { in hl_device_status()
380 if (hdev->reset_info.in_compute_reset) in hl_device_status()
384 } else if (hdev->reset_info.needs_reset) { in hl_device_status()
484 reset_device = hdev->reset_upon_device_release || hdev->reset_info.watchdog_active; in hpriv_release()
489 if (!hdev->reset_info.in_reset && !reset_device && !hdev->pldm) in hpriv_release()
982 spin_lock_init(&hdev->reset_info.lock); in device_early_init()
1161 if (!hdev->reset_info.in_reset) in hl_device_heartbeat()
1162 hdev->reset_info.prev_reset_trigger = HL_RESET_TRIGGER_DEFAULT; in hl_device_heartbeat()
1251 if (!hdev->reset_info.hard_reset_pending) in hl_device_set_debug_mode()
1345 spin_lock(&hdev->reset_info.lock); in hl_device_suspend()
1346 if (hdev->reset_info.in_reset) { in hl_device_suspend()
1347 spin_unlock(&hdev->reset_info.lock); in hl_device_suspend()
1351 hdev->reset_info.in_reset = 1; in hl_device_suspend()
1352 spin_unlock(&hdev->reset_info.lock); in hl_device_suspend()
1405 spin_lock(&hdev->reset_info.lock); in hl_device_resume()
1406 hdev->reset_info.in_reset = 0; in hl_device_resume()
1407 spin_unlock(&hdev->reset_info.lock); in hl_device_resume()
1565 hdev->reset_info.curr_reset_cause = HL_RESET_CAUSE_HEARTBEAT; in handle_reset_trigger()
1568 hdev->reset_info.curr_reset_cause = HL_RESET_CAUSE_TDR; in handle_reset_trigger()
1571 hdev->reset_info.curr_reset_cause = HL_RESET_CAUSE_UNKNOWN; in handle_reset_trigger()
1574 hdev->reset_info.curr_reset_cause = HL_RESET_CAUSE_UNKNOWN; in handle_reset_trigger()
1582 if (hdev->reset_info.prev_reset_trigger != cur_reset_trigger) { in handle_reset_trigger()
1583 hdev->reset_info.prev_reset_trigger = cur_reset_trigger; in handle_reset_trigger()
1584 hdev->reset_info.reset_trigger_repeated = 0; in handle_reset_trigger()
1586 hdev->reset_info.reset_trigger_repeated = 1; in handle_reset_trigger()
1690 spin_lock(&hdev->reset_info.lock); in hl_device_reset()
1691 if (hdev->reset_info.in_reset) { in hl_device_reset()
1693 if (hard_reset && hdev->reset_info.in_compute_reset) in hl_device_reset()
1694 hdev->reset_info.hard_reset_schedule_flags = flags; in hl_device_reset()
1695 spin_unlock(&hdev->reset_info.lock); in hl_device_reset()
1702 hdev->reset_info.in_compute_reset = !hard_reset; in hl_device_reset()
1704 hdev->reset_info.in_reset = 1; in hl_device_reset()
1706 spin_unlock(&hdev->reset_info.lock); in hl_device_reset()
1712 if ((hard_reset || from_dev_release) && hdev->reset_info.watchdog_active) { in hl_device_reset()
1716 hdev->reset_info.watchdog_active = 0; in hl_device_reset()
1721 hdev->reset_info.in_compute_reset = 0; in hl_device_reset()
1749 hdev->reset_info.hard_reset_pending = true; in hl_device_reset()
1835 hdev->reset_info.hard_reset_pending = false; in hl_device_reset()
1841 if (hdev->reset_info.reset_trigger_repeated && in hl_device_reset()
1842 (hdev->reset_info.prev_reset_trigger == HL_DRV_RESET_FW_FATAL_ERR || in hl_device_reset()
1843 hdev->reset_info.prev_reset_trigger == in hl_device_reset()
1956 spin_lock(&hdev->reset_info.lock); in hl_device_reset()
1957 hdev->reset_info.in_compute_reset = 0; in hl_device_reset()
1963 if (!hard_reset && hdev->reset_info.hard_reset_schedule_flags) in hl_device_reset()
1966 hdev->reset_info.in_reset = 0; in hl_device_reset()
1968 spin_unlock(&hdev->reset_info.lock); in hl_device_reset()
1970 hdev->reset_info.needs_reset = false; in hl_device_reset()
1982 hdev->reset_info.hard_reset_cnt++; in hl_device_reset()
1994 hdev->reset_info.compute_reset_cnt++; in hl_device_reset()
1998 flags = hdev->reset_info.hard_reset_schedule_flags; in hl_device_reset()
1999 hdev->reset_info.hard_reset_schedule_flags = 0; in hl_device_reset()
2010 spin_lock(&hdev->reset_info.lock); in hl_device_reset()
2011 hdev->reset_info.in_compute_reset = 0; in hl_device_reset()
2017 hdev->reset_info.hard_reset_cnt++; in hl_device_reset()
2024 hdev->reset_info.compute_reset_cnt++; in hl_device_reset()
2027 spin_unlock(&hdev->reset_info.lock); in hl_device_reset()
2033 hdev->reset_info.in_reset = 0; in hl_device_reset()
2035 spin_unlock(&hdev->reset_info.lock); in hl_device_reset()
2073 if (!ctx->hpriv->notifier_event.eventfd && !hdev->reset_info.watchdog_active) in hl_device_cond_reset()
2079 spin_lock(&hdev->reset_info.lock); in hl_device_cond_reset()
2080 if (hdev->reset_info.in_reset) { in hl_device_cond_reset()
2081 spin_unlock(&hdev->reset_info.lock); in hl_device_cond_reset()
2085 if (hdev->reset_info.watchdog_active) { in hl_device_cond_reset()
2095 hdev->reset_info.watchdog_active = 1; in hl_device_cond_reset()
2097 spin_unlock(&hdev->reset_info.lock); in hl_device_cond_reset()
2524 spin_lock(&hdev->reset_info.lock); in hl_device_fini()
2525 device_in_reset = !!hdev->reset_info.in_reset; in hl_device_fini()
2527 hdev->reset_info.in_reset = 1; in hl_device_fini()
2528 spin_unlock(&hdev->reset_info.lock); in hl_device_fini()
2533 spin_lock(&hdev->reset_info.lock); in hl_device_fini()
2534 device_in_reset = !!hdev->reset_info.in_reset; in hl_device_fini()
2536 hdev->reset_info.in_reset = 1; in hl_device_fini()
2537 spin_unlock(&hdev->reset_info.lock); in hl_device_fini()
2563 hdev->reset_info.hard_reset_pending = true; in hl_device_fini()