]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: fix possible deadlock in cache invl failure
authorOfir Bitton <obitton@habana.ai>
Tue, 9 Nov 2021 11:12:38 +0000 (13:12 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Sun, 26 Dec 2021 06:59:06 +0000 (08:59 +0200)
commitc661a8389a96468f2e2d067d681e96344a4636bb
treea51e49077994a2ea2e5cace80ce1483aa942d818
parent6d15a886b430470421f5810d1f829f8ff66992f1
habanalabs: fix possible deadlock in cache invl failure

Currently there is a deadlock in driver in scenarios where MMU
cache invalidation fails. The issue is basically device reset
being performed without releasing the MMU mutex.
The solution is to skip device reset as it is not necessary.
In addition we introduce a slight code refactor that prints the
invalidation error from a single location.

Signed-off-by: Ofir Bitton <obitton@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_buffer.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/memory.c
drivers/misc/habanalabs/common/mmu/mmu.c
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/goya/goya.c