diff options
author | Ben Segal <bpsegal20@gmail.com> | 2019-07-18 12:27:00 +0000 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@gmail.com> | 2019-07-29 11:40:25 +0300 |
commit | 2aa4e410795cb94b6577fe0e251b5f5226499310 (patch) | |
tree | 57656c4a0dae4087174511eb9108b461bb2f0a3d /drivers/misc/habanalabs/firmware_if.c | |
parent | 75035fe22b808a520e1d712ebe913684ba406e01 (diff) |
habanalabs: fix host memory polling in BE architecture
This patch fix a bug in the host memory polling macro. The bug is that the
memory being polled can be written by the device, which always writes it
in LE. However, if the host is running Linux in BE mode, we need to
convert the value that was written by the device before matching it to the
required value that the caller has given to the macro.
Signed-off-by: Ben Segal <bpsegal20@gmail.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Diffstat (limited to 'drivers/misc/habanalabs/firmware_if.c')
-rw-r--r-- | drivers/misc/habanalabs/firmware_if.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/misc/habanalabs/firmware_if.c b/drivers/misc/habanalabs/firmware_if.c index 61112eda4dd2..ea2ca67fbfbf 100644 --- a/drivers/misc/habanalabs/firmware_if.c +++ b/drivers/misc/habanalabs/firmware_if.c @@ -97,7 +97,8 @@ int hl_fw_send_cpu_message(struct hl_device *hdev, u32 hw_queue_id, u32 *msg, } rc = hl_poll_timeout_memory(hdev, &pkt->fence, tmp, - (tmp == ARMCP_PACKET_FENCE_VAL), 1000, timeout); + (tmp == ARMCP_PACKET_FENCE_VAL), 1000, + timeout, true); hl_hw_queue_inc_ci_kernel(hdev, hw_queue_id); |