habanalabs: refactor dma asic-specific functions
authorOhad Sharabi <osharabi@habana.ai>
Sun, 12 Jun 2022 12:00:29 +0000 (15:00 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 12 Jul 2022 06:09:26 +0000 (09:09 +0300)
commit1ef0c327e1caa1d573b8e949bc72bf8571cf26ee
tree0658dd2dacb90c5a9fa1b0299b050c06ab9de66c
parentc37d50e84e60279f7799122b856d89d57ca9e6d8
habanalabs: refactor dma asic-specific functions

This is a pre-requisite patch for adding tracepoints to the DMA memory
operations (allocation/free) in the driver.

The main purpose is to be able to cross data with the map operations and
determine whether memory violation occurred, for example free DMA
allocation before unmapping it from device memory.

To achieve this the DMA alloc/free code flows were refactored so that a
single DMA tracepoint will catch many flows.

Signed-off-by: Ohad Sharabi <osharabi@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/command_buffer.c
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/firmware_if.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/hw_queue.c
drivers/misc/habanalabs/common/irq.c
drivers/misc/habanalabs/gaudi/gaudi.c
drivers/misc/habanalabs/goya/goya.c