Skip to content

Commit f8abaf3

Browse files
committed
habanalabs: fix backward compatibility of idle check
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]>
1 parent 9354f1b commit f8abaf3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/misc/habanalabs/common/habanalabs_ioctl.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ static int hw_idle(struct hl_device *hdev, struct hl_info_args *args)
133133

134134
hw_idle.is_idle = hdev->asic_funcs->is_device_idle(hdev,
135135
&hw_idle.busy_engines_mask_ext, NULL);
136+
hw_idle.busy_engines_mask =
137+
lower_32_bits(hw_idle.busy_engines_mask_ext);
136138

137139
return copy_to_user(out, &hw_idle,
138140
min((size_t) max_size, sizeof(hw_idle))) ? -EFAULT : 0;

0 commit comments

Comments
 (0)