habanalabs: refactor MMU to support dual residency MMU
authorMoti Haimovski <mhaimovski@habana.ai>
Mon, 5 Oct 2020 14:59:29 +0000 (17:59 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 30 Nov 2020 08:47:31 +0000 (10:47 +0200)
commitccf979ee330b195961116f74cd75ba677fdc4cd7
tree077773b4fb9a248f509f38b9ad8c6f3c6d387645
parenta6722d6a97de26f81c86d28ffd535b8bc005d436
habanalabs: refactor MMU to support dual residency MMU

This commit refactors the MMU code to support PCI MMU page tables
residing on host and DCORE MMU residing on the device DRAM at the
same time.

This is needed for future devices as on GAUDI and GOYA we have
a single MMU where its page tables always reside on DRAM.

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/habanalabs.h
drivers/misc/habanalabs/common/mmu.c
drivers/misc/habanalabs/common/mmu_v1.c