Skip to content

Commit

Permalink
habanalabs: do not halt CoreSight during hard reset
Browse files Browse the repository at this point in the history
During hard reset we must not write to the device.
Hence avoid halting CoreSight during user context close if it is done
during hard reset.
In addition, we must not re-enable clock gating afterwards as it was
deliberately disabled in the beginning of the hard reset flow.

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
  • Loading branch information
Omer Shpigelman authored and Oded Gabbay committed Feb 11, 2020
1 parent 908087f commit a37e471
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/misc/habanalabs/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,9 @@ int hl_device_set_debug_mode(struct hl_device *hdev, bool enable)
goto out;
}

hdev->asic_funcs->halt_coresight(hdev);
if (!hdev->hard_reset_pending)
hdev->asic_funcs->halt_coresight(hdev);

hdev->in_debug = 0;

goto out;
Expand Down

0 comments on commit a37e471

Please sign in to comment.