diff options
author | Oded Gabbay | 2019-07-30 09:10:50 +0300 |
---|---|---|
committer | Oded Gabbay | 2019-09-05 14:55:26 +0300 |
commit | 4d6a7751f6c376f8d20f46685fe87bc47557e233 (patch) | |
tree | a24ace3555d51bb073f493611669035035760888 /Documentation/sphinx | |
parent | b968eb1a84e09f30eab9b88d30758187087b3492 (diff) |
habanalabs: create two char devices per ASIC
This patch changes the driver to create two char devices for each ASIC
it discovers. This is done to allow system/monitoring applications to
query the device for stats, information, idle state and more, while also
allowing the deep-learning application to send work to the ASIC.
One char device is the original device, hlX. IOCTL calls through this
device file can perform any task on the device (compute, memory, queries).
The open function for this device will fail if it was called before but
the file-descriptor it created was not completely released yet (the
release callback function is not called from the kernel until all
instances of that FD are closed). The driver needs to keep this behavior
to support backward compatibility with existing userspace, which count
that the open will fail if the device is "occupied".
The second char device is called "hl_controlDx", where x is the same index
of the main device with a minor number of the original char device + 1.
Applications that open this device can only call the INFO IOCTL. There is
no limitation on the number of applications opening this device.
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation/sphinx')
0 files changed, 0 insertions, 0 deletions