]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: halt debug engines on user process close
authorOmer Shpigelman <oshpigelman@habana.ai>
Wed, 1 May 2019 11:38:38 +0000 (14:38 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Fri, 24 May 2019 19:46:15 +0000 (22:46 +0300)
commiteb7f36ddd1158196fb2c27cae18abfab647639a3
tree2e07242d5a6ada3012f753403ce5505807f75a8f
parent49250288820449e26abffc1305ba221bd05ce90d
habanalabs: halt debug engines on user process close

This patch fix a potential bug where a user's process has closed
unexpectedly without disabling the debug engines. In that case, the debug
engines might continue running but because the user's MMU mappings are
going away, we will get page fault errors.

This behavior is also opposed to the general rule where nothing runs on
the device after the user process closes.

The patch stops the debug H/W engines upon process termination and thus
makes sure nothing runs on the device after the process goes away.

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/context.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/goya/goyaP.h
drivers/misc/habanalabs/goya/goya_coresight.c
drivers/misc/habanalabs/habanalabs.h