accel/habanalabs: expose module id through sysfs
authorDani Liberman <dliberman@habana.ai>
Mon, 13 Nov 2023 19:11:13 +0000 (21:11 +0200)
committerOded Gabbay <ogabbay@kernel.org>
Tue, 19 Dec 2023 09:09:43 +0000 (11:09 +0200)
commit47a552863d6c9ea26abe9ad35d2c35e4d6896551
tree94945842fc1f20b6612795fdbd47b0e723d7b3fc
parentc9f9d0e3d0db300315d3bde7f122439633e6f007
accel/habanalabs: expose module id through sysfs

Module ID exposes the physical location of the device in the server,
from the pov of the devices in regard to how they are connected by
internal fabric.

This information is already exposed in our INFO ioctl, but there are
utilities and scripts running in data-center which are already
accessing sysfs for topology information and it is easier for them
to continue getting that information from sysfs instead of opening
a file descriptor.

Signed-off-by: Dani Liberman <dliberman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Documentation/ABI/testing/sysfs-driver-habanalabs
drivers/accel/habanalabs/common/sysfs.c