Omer Shpigelman f650a95b71 habanalabs: complete user context cleanup before hard reset
This patch fixes a bug which led to a crash during hard reset flow.
Before a hard reset is executed, we wait a few seconds for the user
context cleanup to complete.
If it wasn't completed, we kill the user process and move on to the reset
flow.
Upon killing the user process, the context cleanup flow begins and may
take a while due to MMU unmaps.
Meanwhile, in the driver reset flow, we change the PCI DRAM bar location
which can interfere with the MMU that uses the bar.
If the context cleanup flow didn't finish quickly, a crash may occur due
to PCI DRAM bar mislocation during the MMU unmap.
Hence adding a wait between killing the user process and the start of the
reset flow.

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
2019-03-13 13:36:28 +02:00
..
2018-08-21 23:54:18 -04:00
2019-02-21 23:15:10 +11:00
2019-02-28 12:55:40 +01:00
2019-03-09 15:53:03 -08:00
2019-02-26 12:53:55 +01:00
2018-09-25 20:21:02 +02:00
2019-02-18 09:46:43 +01:00
2018-04-23 13:31:27 +02:00