]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: remove compute context pointer
authorOded Gabbay <ogabbay@kernel.org>
Tue, 30 Nov 2021 21:08:21 +0000 (23:08 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:08 +0000 (08:59 +0200)
commit641495ab7312877445045e1a397cee0987ec6c72
treee3226113771d41c167d633b5db227728f3e68b92
parent6f545b3a43e8feaf5f7f9173ca10a3f0fbb69bc0
habanalabs: remove compute context pointer

It was an error to save the compute context's pointer in the device
structure, as it allowed its use without proper ref-cnt.

Change the variable to a flag that only indicates whether there is
an active compute context. Code that needs the pointer will now
be forced to use proper internal APIs to get the pointer.

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
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/goya/goya_hwmgr.c