]> www.infradead.org Git - users/dwmw2/linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Sep 2019 08:23:20 +0000 (10:23 +0200)
commita1a6c6b4f8d8e74fe62287bc314716b726fde32c
tree1c5463d70ccf1cf370504ffd1ee06991e88e7f57
parent1900d706b9c4aff70d9d599d327f283e1b5e0f15
habanalabs: fix endianness handling for internal QMAN submission

[ Upstream commit b9040c99414ba5b85090595a61abc686a5dbb388 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/misc/habanalabs/goya/goya.c
drivers/misc/habanalabs/goya/goyaP.h
drivers/misc/habanalabs/habanalabs.h
drivers/misc/habanalabs/hw_queue.c