]> Git Repo - linux.git/commitdiff
habanalabs: fix backward compatibility of idle check
authorOded Gabbay <[email protected]>
Mon, 18 Jan 2021 11:19:51 +0000 (13:19 +0200)
committerOded Gabbay <[email protected]>
Thu, 21 Jan 2021 18:30:22 +0000 (20:30 +0200)
Need to take the lower 32 bits of the driver's 64-bit idle mask and put
it in the legacy 32-bit variable that the userspace reads to know the
idle mask.

Signed-off-by: Oded Gabbay <[email protected]>
drivers/misc/habanalabs/common/habanalabs_ioctl.c

index 12efbd9d2e3a0b7459dcb8298e69248bef1e1750..d25892d61ec9ddc2ceda987b39d45d0ec6ec75d9 100644 (file)
@@ -133,6 +133,8 @@ static int hw_idle(struct hl_device *hdev, struct hl_info_args *args)
 
        hw_idle.is_idle = hdev->asic_funcs->is_device_idle(hdev,
                                        &hw_idle.busy_engines_mask_ext, NULL);
+       hw_idle.busy_engines_mask =
+                       lower_32_bits(hw_idle.busy_engines_mask_ext);
 
        return copy_to_user(out, &hw_idle,
                min((size_t) max_size, sizeof(hw_idle))) ? -EFAULT : 0;
This page took 0.054528 seconds and 4 git commands to generate.