summaryrefslogtreecommitdiff
path: root/drivers/misc
diff options
context:
space:
mode:
authorTal Cohen <talcohen@habana.ai>2022-10-18 17:35:06 +0300
committerOded Gabbay <ogabbay@kernel.org>2022-11-23 17:13:44 +0300
commit4a9c6e2cdf2b4128f5204b9cf14e3a788a8511df (patch)
tree0b050951b6e4f3ba10abb15455717b531079dd43 /drivers/misc
parent1b363adc7fbe37c4b6c18864c1f7043d85b4af6e (diff)
downloadlinux-4a9c6e2cdf2b4128f5204b9cf14e3a788a8511df.tar.xz
habanalabs: no consecutive err when user context is enabled
Consecutive error protects a device reset loop from being triggered due to h/w issues and enters the device into an unavailable state. When user may cause the error, an unavailable state will prevent the user from running its workloads. The commit prevents entering consecutive state when a user context is enabled. Signed-off-by: Tal Cohen <talcohen@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/habanalabs/common/device.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/device.c b/drivers/misc/habanalabs/common/device.c
index bcd959924971..61ddcb1ce508 100644
--- a/drivers/misc/habanalabs/common/device.c
+++ b/drivers/misc/habanalabs/common/device.c
@@ -1320,6 +1320,10 @@ static void handle_reset_trigger(struct hl_device *hdev, u32 flags)
{
u32 cur_reset_trigger = HL_RESET_TRIGGER_DEFAULT;
+ /* No consecutive mechanism when user context exists */
+ if (hdev->is_compute_ctx_active)
+ return;
+
/*
* 'reset cause' is being updated here, because getting here
* means that it's the 1st time and the last time we're here