diff options
author | Omer Shpigelman <oshpigelman@habana.ai> | 2021-08-16 12:27:12 +0200 |
---|---|---|
committer | Oded Gabbay <ogabbay@kernel.org> | 2021-09-01 17:38:24 +0200 |
commit | 71731090ab17a208a58020e4b342fdfee280458a (patch) | |
tree | 3360571c3a780bb23a471791b5de4ecd5fcb8741 /include | |
parent | habanalabs/gaudi: invalidate PMMU mem cache on init (diff) | |
download | linux-71731090ab17a208a58020e4b342fdfee280458a.tar.xz linux-71731090ab17a208a58020e4b342fdfee280458a.zip |
habanalabs: add "in device creation" status
On init, the disabled state is cleared right before hw_init and that
causes the device to report on "Operational" state before the device
initialization is finished. Although the char device is not yet exposed
to the user at this stage, the sysfs entries are exposed.
This can cause errors in monitoring applications that use the sysfs
entries.
In order to avoid this, a new state "in device creation" is introduced
to ne reported when the device is not disabled but is still in init
flow.
Signed-off-by: Omer Shpigelman <oshpigelman@habana.ai>
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Signed-off-by: Oded Gabbay <ogabbay@kernel.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/uapi/misc/habanalabs.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/uapi/misc/habanalabs.h b/include/uapi/misc/habanalabs.h index 6686b73a0834..7cc2a0f3f2f5 100644 --- a/include/uapi/misc/habanalabs.h +++ b/include/uapi/misc/habanalabs.h @@ -276,7 +276,9 @@ enum hl_device_status { HL_DEVICE_STATUS_OPERATIONAL, HL_DEVICE_STATUS_IN_RESET, HL_DEVICE_STATUS_MALFUNCTION, - HL_DEVICE_STATUS_NEEDS_RESET + HL_DEVICE_STATUS_NEEDS_RESET, + HL_DEVICE_STATUS_IN_DEVICE_CREATION, + HL_DEVICE_STATUS_LAST = HL_DEVICE_STATUS_IN_DEVICE_CREATION }; enum hl_server_type { |