]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: MMU invalidation h/w is per device
authorOded Gabbay <ogabbay@kernel.org>
Mon, 5 Sep 2022 14:14:45 +0000 (17:14 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 19 Sep 2022 12:08:39 +0000 (15:08 +0300)
commitb5ff7606585bef2c4ef8946388703d5fbf73b064
treed0ddfb95f9eeef1e6e83da5a8e85fefc960d7123
parente7468e5010db1dfb03d0d029e5b193633e62f77a
habanalabs: MMU invalidation h/w is per device

The code used the mmu mutex to protect access to the context's page
tables and invalidation of the MMU cache. Because pgt are per
context, the mmu mutex was a member of the context object.

The problem is that the device has a single MMU invalidation h/w
(per MMU). Therefore, the mmu mutex should not be a property of the
context but a property of the device.

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/gaudi2/gaudi2.c