habanalabs: improve hard reset procedure
authorOfir Bitton <obitton@habana.ai>
Thu, 8 Oct 2020 07:27:42 +0000 (10:27 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 30 Nov 2020 08:47:34 +0000 (10:47 +0200)
commitadb51298fdc41b89f47c520171d86e4859cc7731
tree376f52afa6005ee756d27319ea07dad2c1f909a0
parent804a72276cc4a1e27822d611907350b74f7fe561
habanalabs: improve hard reset procedure

We want to handle the scenario in which the driver was not able
to kill all user processes due to many memory mappings.
We need to retry again after some period while releasing the cores.
The devices will be unusable and "in-reset" status during that time.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h