habanalabs: Allow accessing host mapped addresses via debugfs
authorTomer Tayar <ttayar@habana.ai>
Sun, 16 Jun 2019 13:48:29 +0000 (13:48 +0000)
committerOded Gabbay <oded.gabbay@gmail.com>
Sun, 16 Jun 2019 13:48:29 +0000 (13:48 +0000)
commit4a0ce7764b09044fdb5f92dcf03ec5d8657296f4
tree009d171c57d8625736a2709c9fe30c45a02666a8
parent747bf88c61772ec1e670ee04f4db6af15398c2ef
habanalabs: Allow accessing host mapped addresses via debugfs

Allows using the addr/data32 debugfs nodes to access a device VA of a
host mapped memory when the IOMMU is disabled.

Due to the possible large amount of a user host mapped memory, the
driver doesn't maintain a database with the host addresses per device VA.
When the IOMMU is disabled, this missing info is being overcome by
simply using phys_to_virt(). However, this is not useful when the IOMMU
is enabled, and thus the enforced limitation.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Documentation/ABI/testing/debugfs-driver-habanalabs
drivers/misc/habanalabs/debugfs.c
drivers/misc/habanalabs/goya/goya.c