habanalabs: added open_stats info ioctl
authorYuri Nudelman <ynudelman@habana.ai>
Mon, 24 May 2021 08:25:21 +0000 (11:25 +0300)
committerOded Gabbay <ogabbay@kernel.org>
Fri, 18 Jun 2021 12:23:42 +0000 (15:23 +0300)
commite307b302be8beb7fb59aa16621d5081b69397076
treeae97590323570265c1d6de197c99c64f245d5cd8
parent1f7ef4bf41c7c2abad3d21b8c69db11fc3ebc4f5
habanalabs: added open_stats info ioctl

In a system with multiple ASICs, there is a need to provide monitoring
tools with information on how long a device was opened and how many
times a device was opened.

Therefore, we add a new opcode to the INFO ioctl to provide that
information.

Signed-off-by: Yuri Nudelman <ynudelman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
drivers/misc/habanalabs/common/device.c
drivers/misc/habanalabs/common/habanalabs.h
drivers/misc/habanalabs/common/habanalabs_drv.c
drivers/misc/habanalabs/common/habanalabs_ioctl.c
include/uapi/misc/habanalabs.h