habanalabs: share a single ctx-mutex between all MMUs
authorMoti Haimovski <mhaimovski@habana.ai>
Tue, 27 Oct 2020 09:03:32 +0000 (11:03 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 30 Nov 2020 08:47:35 +0000 (10:47 +0200)
commitfe2bc2d249539c117cc887dc1f960ffcbba52d1e
treea27d616e6eef737982da9682e930d62d690803a6
parent412c41fcd526b239472a24974591a05227bf5225
habanalabs: share a single ctx-mutex between all MMUs

Multiple locks are usually a source of problems, which in the MMU
case can be avoided since it is relatively rare that both MMU
tables are updated at the same time.

Therefore, use a single shared lock instead of two separate ones.

Signed-off-by: Moti Haimovski <mhaimovski@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/mmu.c
drivers/misc/habanalabs/common/mmu_v1.c