summaryrefslogtreecommitdiffstats
path: root/drivers/misc/habanalabs/common/habanalabs_ioctl.c
diff options
context:
space:
mode:
authorOded Gabbay <ogabbay@kernel.org>2021-07-15 10:48:43 +0300
committerOded Gabbay <ogabbay@kernel.org>2021-09-01 18:38:24 +0300
commit5dc9ffaff1420676827c4054bc789a7710f2a272 (patch)
tree3789555142f0f9baf6d167e67e5919fdc698b251 /drivers/misc/habanalabs/common/habanalabs_ioctl.c
parente62ada5e23d06dfeba2d3b098a9c70ac027c19b6 (diff)
downloadlinux-5dc9ffaff1420676827c4054bc789a7710f2a272.tar.bz2
habanalabs: expose server type in INFO IOCTL
Add the server type property to the hl_info_hw_ip_info structure that is exposed to the user via the INFO IOCTL. This is needed by the userspace s/w stack to know the connections map of the internal links that connect the ASIC among themselves inside the server. The F/W will tell us, as part of the NIC information, the server type that the GAUDI is located in. Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'drivers/misc/habanalabs/common/habanalabs_ioctl.c')
-rw-r--r--drivers/misc/habanalabs/common/habanalabs_ioctl.c2
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 f4dda7b4acdd..86c3257d9ae1 100644
--- a/drivers/misc/habanalabs/common/habanalabs_ioctl.c
+++ b/drivers/misc/habanalabs/common/habanalabs_ioctl.c
@@ -94,6 +94,8 @@ static int hw_ip_info(struct hl_device *hdev, struct hl_info_args *args)
hw_ip.first_available_interrupt_id =
prop->first_available_user_msix_interrupt;
+ hw_ip.server_type = prop->server_type;
+
return copy_to_user(out, &hw_ip,
min((size_t) size, sizeof(hw_ip))) ? -EFAULT : 0;
}