]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: keep control device alive during hard reset
authorDani Liberman <dliberman@habana.ai>
Wed, 8 Dec 2021 07:52:03 +0000 (09:52 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:09 +0000 (08:59 +0200)
commit621de1b55e4ba0d61199817386e37686e3625063
tree08e18a1b2fefe2b85dd06fa9ab4ba3de9f4e703f
parent763654e2417c8455404634abdaf57620e36f207c
habanalabs: keep control device alive during hard reset

Need to allow user retrieve data during reset and afterwards without
the need to reopen the device.
Did it by seperating the user peocesses list into two lists:
1. fpriv_list which contains list of user processes that opened
   the device (currently only one).
2. fpriv_ctrl_list which contains list of user processes that opened
   the control device. This processes in this list shall not be
   killed during reset, only when the device is suddenly removed from
   PCI chain.

Signed-off-by: Dani Liberman <dliberman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/context.c
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/habanalabs_drv.c