summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/goya/goyaP.h
diff options
context:
space:
mode:
authorOmer Shpigelman2019-05-01 13:38:38 +0200
committerOded Gabbay2019-05-24 21:46:15 +0200
commit89225ce4fc43da2db968923fc94e1469dbcdbd5a (patch)
tree2e07242d5a6ada3012f753403ce5505807f75a8f /drivers/misc/habanalabs/goya/goyaP.h
parentLinux 5.2-rc1 (diff)
downloadkernel-qcow2-linux-89225ce4fc43da2db968923fc94e1469dbcdbd5a.tar.gz
kernel-qcow2-linux-89225ce4fc43da2db968923fc94e1469dbcdbd5a.tar.xz
kernel-qcow2-linux-89225ce4fc43da2db968923fc94e1469dbcdbd5a.zip
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>
Diffstat (limited to 'drivers/misc/habanalabs/goya/goyaP.h')
-rw-r--r--drivers/misc/habanalabs/goya/goyaP.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/goya/goyaP.h b/drivers/misc/habanalabs/goya/goyaP.h
index 14e216cb3668..c83cab0d641e 100644
--- a/drivers/misc/habanalabs/goya/goyaP.h
+++ b/drivers/misc/habanalabs/goya/goyaP.h
@@ -202,6 +202,7 @@ void goya_add_device_attr(struct hl_device *hdev,
struct attribute_group *dev_attr_grp);
int goya_armcp_info_get(struct hl_device *hdev);
int goya_debug_coresight(struct hl_device *hdev, void *data);
+void goya_halt_coresight(struct hl_device *hdev);
void goya_mmu_prepare(struct hl_device *hdev, u32 asid);
int goya_mmu_clear_pgt_range(struct hl_device *hdev);