habanalabs: Manipulate DMA addresses in ASIC functions
authorTomer Tayar <ttayar@habana.ai>
Wed, 1 May 2019 08:28:15 +0000 (11:28 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Wed, 1 May 2019 08:28:15 +0000 (11:28 +0300)
commit94cb669ceb0589f24ee91e3a8ae8ed3013fd6904
tree3935e4e2ee9292e99df4aaacee3adf08d6a8423b
parentd9c3aa8038c391f38a391289989ca0ac356a9501
habanalabs: Manipulate DMA addresses in ASIC functions

Routing device accesses to the host memory requires the usage of a base
offset, which is canceled by the iATU just before leaving the device.
The value of the base offset might be distinctive between different ASIC
types.
The manipulation of the addresses is currently used throughout the
driver code, and one should be aware to it whenever providing a host
memory address to the device.
This patch removes this manipulation from the driver common code, and
moves it to the ASIC specific functions that are responsible for
host memory allocation/mapping.

Signed-off-by: Tomer Tayar <ttayar@habana.ai>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/misc/habanalabs/firmware_if.c
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/hw_queue.c
drivers/misc/habanalabs/memory.c
drivers/misc/habanalabs/pci.c