]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: add MMU shadow mapping
authorOmer Shpigelman <oshpigelman@habana.ai>
Sun, 24 Feb 2019 07:17:55 +0000 (09:17 +0200)
committerOded Gabbay <oded.gabbay@gmail.com>
Sun, 24 Feb 2019 07:17:55 +0000 (09:17 +0200)
commit476687853fbf43b716c9d7a0b62ed649657e72cb
tree55cdef7a76cc74e20d86719bf0f7057d5dbaafb0
parent72def5e7be1fc3d9aeb7648ddfc18b9c48bbef8f
habanalabs: add MMU shadow mapping

This patch adds shadow mapping to the MMU module. The shadow mapping
allows traversing the page table in host memory rather reading each PTE
from the device memory.
It brings better performance and avoids reading from invalid device
address upon PCI errors.
Only at the end of map/unmap flow, writings to the device are performed in
order to sync the H/W page tables with the shadow ones.

Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/include/hw_ip/mmu/mmu_general.h
drivers/misc/habanalabs/mmu.c