summaryrefslogtreecommitdiff
path: root/drivers/misc/habanalabs/goya
diff options
context:
space:
mode:
authorAlon Mizrahi <amizrahi@habana.ai>2020-11-10 14:49:10 +0300
committerOded Gabbay <ogabbay@kernel.org>2020-11-30 11:47:35 +0300
commit439bc47b8e833db547c16369ac562f9364e6bc14 (patch)
treefe76f9bd20901409bcdc6ad0f72a1d0bd224e25b /drivers/misc/habanalabs/goya
parent00e1b59c8b155d524cf416155607c3e52c54c32a (diff)
downloadlinux-439bc47b8e833db547c16369ac562f9364e6bc14.tar.xz
habanalabs: firmware returns 64bit argument
F/W message returns 64bit value but up until now we casted it to a 32bit variable, instead of receiving 64bit in the first place. Signed-off-by: Alon Mizrahi <amizrahi@habana.ai> Reviewed-by: Oded Gabbay <ogabbay@kernel.org> Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/goya')
-rw-r--r--drivers/misc/habanalabs/goya/goya.c6
-rw-r--r--drivers/misc/habanalabs/goya/goyaP.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/misc/habanalabs/goya/goya.c b/drivers/misc/habanalabs/goya/goya.c
index 3398b4cc1298..55d174d3cac8 100644
--- a/drivers/misc/habanalabs/goya/goya.c
+++ b/drivers/misc/habanalabs/goya/goya.c
@@ -2954,7 +2954,7 @@ free_fence_ptr:
}
int goya_send_cpu_message(struct hl_device *hdev, u32 *msg, u16 len,
- u32 timeout, long *result)
+ u32 timeout, u64 *result)
{
struct goya_device *goya = hdev->asic_specific;
@@ -4540,7 +4540,7 @@ static int goya_unmask_irq_arr(struct hl_device *hdev, u32 *irq_arr,
{
struct cpucp_unmask_irq_arr_packet *pkt;
size_t total_pkt_size;
- long result;
+ u64 result;
int rc;
int irq_num_entries, irq_arr_index;
__le32 *goya_irq_arr;
@@ -4599,7 +4599,7 @@ static int goya_soft_reset_late_init(struct hl_device *hdev)
static int goya_unmask_irq(struct hl_device *hdev, u16 event_type)
{
struct cpucp_packet pkt;
- long result;
+ u64 result;
int rc;
memset(&pkt, 0, sizeof(pkt));
diff --git a/drivers/misc/habanalabs/goya/goyaP.h b/drivers/misc/habanalabs/goya/goyaP.h
index ef4298f84a0a..8b3408211af6 100644
--- a/drivers/misc/habanalabs/goya/goyaP.h
+++ b/drivers/misc/habanalabs/goya/goyaP.h
@@ -192,7 +192,7 @@ int goya_test_queue(struct hl_device *hdev, u32 hw_queue_id);
int goya_test_queues(struct hl_device *hdev);
int goya_test_cpu_queue(struct hl_device *hdev);
int goya_send_cpu_message(struct hl_device *hdev, u32 *msg, u16 len,
- u32 timeout, long *result);
+ u32 timeout, u64 *result);
long goya_get_temperature(struct hl_device *hdev, int sensor_index, u32 attr);
long goya_get_voltage(struct hl_device *hdev, int sensor_index, u32 attr);