]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs/gaudi: sync stream add protection to SOB reset flow
authorfarah kassabri <fkassabri@habana.ai>
Tue, 30 Mar 2021 13:38:02 +0000 (16:38 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 9 Apr 2021 11:09:24 +0000 (14:09 +0300)
commit86c5860101e4d40ad5135605219ffb49cf7cfe7a
tree1325e0095a976d711b446db5455dde395cee6902
parent56ad83c7f00ced93442be9017e7b6dbfacea3785
habanalabs/gaudi: sync stream add protection to SOB reset flow

Since we moved the SOB reset flow to workqueue and
not part of the fence release flow, we might reach a
scenario where new context is created while we in the middle
of resetting the SOB.
in such cases the reset may fail due to idle check.
This will mess up the streams sync since the SOB value is invalid.
so we protect this area with a mutex, to delay context creation.

Signed-off-by: farah kassabri <fkassabri@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/gaudi/gaudi.c