]> git.baikalelectronics.ru Git - kernel.git/commit
habanalabs: fix endianness handling for internal QMAN submission
authorOded Gabbay <oded.gabbay@gmail.com>
Thu, 8 Aug 2019 12:45:58 +0000 (15:45 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Mon, 12 Aug 2019 06:01:10 +0000 (09:01 +0300)
commit2597268e12217895ea216dd5ed15c50a4c8e7158
tree9f54aa00eb5b48078e8edd906d8e46438bf8e357
parent9ac04d2cfa26f9c69343ccfe9a1b6fbfd4e59499
habanalabs: fix endianness handling for internal QMAN submission

The PQs of internal H/W queues (QMANs) can be located in different memory
areas for different ASICs. Therefore, when writing PQEs, we need to use
the correct function according to the location of the PQ. e.g. if the PQ
is located in the device's memory (SRAM or DRAM), we need to use
memcpy_toio() so it would work in architectures that have separate
address ranges for IO memory.

This patch makes the code that writes the PQE to be ASIC-specific so we
can handle this properly per ASIC.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Tested-by: Ben Segal <bpsegal20@gmail.com>
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/goya/goyaP.h
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/hw_queue.c