linux/drivers/misc/habanalabs
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
..
goya habanalabs: use %px instead of %p in error print 2019-03-02 12:03:56 +01:00
include habanalabs: set DMA0 completion to SOB 1007 2019-02-28 13:04:59 +01:00
asid.c habanalabs: add context and ASID modules 2019-02-18 09:46:44 +01:00
command_buffer.c habanalabs: fix memory leak with CBs with unaligned size 2019-02-28 13:06:09 +01:00
command_submission.c habanalabs: soft-reset device if context-switch fails 2019-02-28 13:07:52 +01:00
context.c habanalabs: add virtual memory and MMU modules 2019-02-18 09:46:46 +01:00
debugfs.c habanalabs: fix MMU number of pages calculation 2019-03-05 10:59:16 +02:00
device.c habanalabs: complete user context cleanup before hard reset 2019-03-13 13:36:28 +02:00
habanalabs_drv.c habanalabs: make functions static or declare them 2019-02-27 16:00:20 +01:00
habanalabs_ioctl.c habanalabs: fix little-endian<->cpu conversion warnings 2019-02-28 13:07:52 +01:00
habanalabs.h habanalabs: fix MMU number of pages calculation 2019-03-05 10:59:16 +02:00
hw_queue.c habanalabs: fix little-endian<->cpu conversion warnings 2019-02-28 13:07:52 +01:00
hwmon.c habanalabs: fix little-endian<->cpu conversion warnings 2019-02-28 13:07:52 +01:00
irq.c habanalabs: fix little-endian<->cpu conversion warnings 2019-02-28 13:07:52 +01:00
Kconfig habanalabs: adjust Kconfig to fix build errors 2019-03-02 12:03:56 +01:00
Makefile habanalabs: add debugfs support 2019-02-18 09:46:46 +01:00
memory.c habanalabs: fix bug when mapping very large memory area 2019-03-07 15:47:19 +02:00
mmu.c habanalabs: use do_div for 64-bit divisions 2019-03-01 13:44:59 +01:00
sysfs.c habanalabs: fix little-endian<->cpu conversion warnings 2019-02-28 13:07:52 +01:00