Skip to content

Commit 1af69d3

Browse files
committed
habanalabs: make the reset code more consistent
In the hl_device_reset we ask about the hard_reset argument when we want to differentiate between soft and hard reset, except for three places where we use "from_hard_reset_thread". Replace one of those locations with the hard_reset argument as it is guaranteed that if we reached to that line in the code during hard_reset, it is from a kernel thread. Signed-off-by: Oded Gabbay <[email protected]> Reviewed-by: Tomer Tayar <[email protected]>
1 parent 52c01b0 commit 1af69d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/habanalabs/device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ int hl_device_reset(struct hl_device *hdev, bool hard_reset,
891891
* can't really exit until all its CSs are done, which is what we
892892
* do in cs rollback
893893
*/
894-
if (from_hard_reset_thread)
894+
if (hard_reset)
895895
device_kill_open_processes(hdev);
896896

897897
/* Release kernel context */

0 commit comments

Comments
 (0)