OSDN Git Service

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)
commit66542c3b9d2fe179f7392f01aaf49a5b432426a7
tree55cdef7a76cc74e20d86719bf0f7057d5dbaafb0
parentd75bcf3e5d60d4e586f3fb20f2cc9041667497a7
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