Commit 39ab4da9 authored by Dafna Hirschfeld's avatar Dafna Hirschfeld Committed by Oded Gabbay

accel/habanalabs: in hl_device_reset remove 'hard_instead_of_soft'

Because this field is only used for debug print,
we can do more precise debug directly instead.
Signed-off-by: default avatarDafna Hirschfeld <dhirschfeld@habana.ai>
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Signed-off-by: default avatarOded Gabbay <ogabbay@kernel.org>
Reviewed-by: default avatarStanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
parent 3b3d853a
...@@ -1474,9 +1474,8 @@ static void handle_reset_trigger(struct hl_device *hdev, u32 flags) ...@@ -1474,9 +1474,8 @@ static void handle_reset_trigger(struct hl_device *hdev, u32 flags)
*/ */
int hl_device_reset(struct hl_device *hdev, u32 flags) int hl_device_reset(struct hl_device *hdev, u32 flags)
{ {
bool hard_reset, from_hard_reset_thread, fw_reset, hard_instead_soft = false, bool hard_reset, from_hard_reset_thread, fw_reset, reset_upon_device_release,
reset_upon_device_release, schedule_hard_reset = false, schedule_hard_reset = false, delay_reset, from_dev_release, from_watchdog_thread;
delay_reset, from_dev_release, from_watchdog_thread;
u64 idle_mask[HL_BUSY_ENGINES_MASK_EXT_SIZE] = {0}; u64 idle_mask[HL_BUSY_ENGINES_MASK_EXT_SIZE] = {0};
struct hl_ctx *ctx; struct hl_ctx *ctx;
int i, rc; int i, rc;
...@@ -1500,7 +1499,7 @@ int hl_device_reset(struct hl_device *hdev, u32 flags) ...@@ -1500,7 +1499,7 @@ int hl_device_reset(struct hl_device *hdev, u32 flags)
} }
if (!hard_reset && !hdev->asic_prop.supports_compute_reset) { if (!hard_reset && !hdev->asic_prop.supports_compute_reset) {
hard_instead_soft = true; dev_dbg(hdev->dev, "asic doesn't support compute reset - do hard-reset instead\n");
hard_reset = true; hard_reset = true;
} }
...@@ -1515,13 +1514,11 @@ int hl_device_reset(struct hl_device *hdev, u32 flags) ...@@ -1515,13 +1514,11 @@ int hl_device_reset(struct hl_device *hdev, u32 flags)
} }
if (!hard_reset && !hdev->asic_prop.allow_inference_soft_reset) { if (!hard_reset && !hdev->asic_prop.allow_inference_soft_reset) {
hard_instead_soft = true; dev_dbg(hdev->dev,
"asic doesn't allow inference soft reset - do hard-reset instead\n");
hard_reset = true; hard_reset = true;
} }
if (hard_instead_soft)
dev_dbg(hdev->dev, "Doing hard-reset instead of compute reset\n");
do_reset: do_reset:
/* Re-entry of reset thread */ /* Re-entry of reset thread */
if (from_hard_reset_thread && hdev->process_kill_trial_cnt) if (from_hard_reset_thread && hdev->process_kill_trial_cnt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment