accel/habanalabs/gaudi2: move HMMU page tables to device memory
authorFarah Kassabri <fkassabri@habana.ai>
Thu, 2 Nov 2023 09:53:29 +0000 (11:53 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Mon, 26 Feb 2024 07:30:40 +0000 (09:30 +0200)
commitf728c17fc97aea7a33151d9ba64106291c62bb02
treeef840d707bbfa0b3c8135eb6efda8e890fd2cd75
parent246d8b6cfb80a31e3cc287e3c1db6a5515b7c20a
accel/habanalabs/gaudi2: move HMMU page tables to device memory

Currently the HMMU page tables reside in the host memory,
which will cause host access from the device for every page walk.
This can affect PCIe bandwidth in certain scenarios.

To prevent that problem, HMMU page tables will be moved to the device
memory so the miss transaction will read the hops from there instead of
going to the host.

Signed-off-by: Farah Kassabri <fkassabri@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/accel/habanalabs/common/habanalabs.h
drivers/accel/habanalabs/common/hw_queue.c
drivers/accel/habanalabs/common/mmu/Makefile
drivers/accel/habanalabs/common/mmu/mmu.c
drivers/accel/habanalabs/common/mmu/mmu_v1.c
drivers/accel/habanalabs/common/mmu/mmu_v2.c [new file with mode: 0644]
drivers/accel/habanalabs/gaudi/gaudi.c
drivers/accel/habanalabs/gaudi2/gaudi2.c
drivers/accel/habanalabs/gaudi2/gaudi2P.h
drivers/accel/habanalabs/include/hw_ip/mmu/mmu_general.h