diff options
| author | Oded Gabbay <ogabbay@kernel.org> | 2021-01-18 13:19:51 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-02-07 15:37:17 +0100 |
| commit | 90981a2171b9fdb6d20046f7ce3d70f8c460e53e (patch) | |
| tree | 59e7fda7d5b321380a8e2c7adeb261c858a6b3d7 | |
| parent | 4439d22c3758df25bb70243e0171e9728582f2a8 (diff) | |
| download | linux-90981a2171b9fdb6d20046f7ce3d70f8c460e53e.tar.gz linux-90981a2171b9fdb6d20046f7ce3d70f8c460e53e.tar.bz2 linux-90981a2171b9fdb6d20046f7ce3d70f8c460e53e.zip | |
habanalabs: fix backward compatibility of idle check
[ Upstream commit f8abaf379bfe19600f96ae79a6759eb37039ae05 ]
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 <ogabbay@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
| -rw-r--r-- | drivers/misc/habanalabs/common/habanalabs_ioctl.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/habanalabs/common/habanalabs_ioctl.c b/drivers/misc/habanalabs/common/habanalabs_ioctl.c index 07317ea49129..35401148969f 100644 --- a/drivers/misc/habanalabs/common/habanalabs_ioctl.c +++ b/drivers/misc/habanalabs/common/habanalabs_ioctl.c @@ -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; |
