diff options
author | Oded Gabbay <oded.gabbay@gmail.com> | 2019-08-08 15:45:58 +0300 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2019-08-12 09:01:10 +0300 |
commit | b9040c99414ba5b85090595a61abc686a5dbb388 (patch) | |
tree | 9f54aa00eb5b48078e8edd906d8e46438bf8e357 /drivers/misc/habanalabs/goya/goyaP.h | |
parent | 4e87334a0ef43663019dbaf3638ad10fd8c3320c (diff) | |
download | linux-stable-b9040c99414ba5b85090595a61abc686a5dbb388.tar.gz linux-stable-b9040c99414ba5b85090595a61abc686a5dbb388.tar.bz2 linux-stable-b9040c99414ba5b85090595a61abc686a5dbb388.zip |
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>
Diffstat (limited to 'drivers/misc/habanalabs/goya/goyaP.h')
-rw-r--r-- | drivers/misc/habanalabs/goya/goyaP.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/goya/goyaP.h b/drivers/misc/habanalabs/goya/goyaP.h index f8c611883dc1..d7f48c9c41cd 100644 --- a/drivers/misc/habanalabs/goya/goyaP.h +++ b/drivers/misc/habanalabs/goya/goyaP.h @@ -177,7 +177,7 @@ int goya_late_init(struct hl_device *hdev); void goya_late_fini(struct hl_device *hdev); void goya_ring_doorbell(struct hl_device *hdev, u32 hw_queue_id, u32 pi); -void goya_flush_pq_write(struct hl_device *hdev, u64 *pq, u64 exp_val); +void goya_pqe_write(struct hl_device *hdev, __le64 *pqe, struct hl_bd *bd); void goya_update_eq_ci(struct hl_device *hdev, u32 val); void goya_restore_phase_topology(struct hl_device *hdev); int goya_context_switch(struct hl_device *hdev, u32 asid); |