accel/amdxdna: spell out the ERT command state values
PATCH 1/1 accel/amdxdna: spell out the ERT command state values
enum ert_cmd_state has no explicit values, but the enumerators are written into the command header that user space reads back from the shared command BO, so they are ABI. Inserting a state would silently renumber every value after it.
Assign them, as enum ert_cmd_opcode above already does.
Signed-off-by Taimuraz Kaitmazov <[email protected]>
--- drivers/accel/amdxdna/amdxdna_ctx.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
drivers/accel/amdxdna/amdxdna_ctx.h +11 -10
@@ -22,17 +22,18 @@ enum ert_cmd_opcode { ERT_INVALID_CMD = ~0U, }; +/* Reported to user space in the command header, so the values are ABI. */ enum ert_cmd_state { -ERT_CMD_STATE_INVALID , -ERT_CMD_STATE_NEW , -ERT_CMD_STATE_QUEUED , -ERT_CMD_STATE_RUNNING , -ERT_CMD_STATE_COMPLETED , -ERT_CMD_STATE_ERROR , -ERT_CMD_STATE_ABORT , -ERT_CMD_STATE_SUBMITTED , -ERT_CMD_STATE_TIMEOUT , -ERT_CMD_STATE_NORESPONSE , +ERT_CMD_STATE_INVALID =0 , +ERT_CMD_STATE_NEW =1 , +ERT_CMD_STATE_QUEUED =2 , +ERT_CMD_STATE_RUNNING =3 , +ERT_CMD_STATE_COMPLETED =4 , +ERT_CMD_STATE_ERROR =5 , +ERT_CMD_STATE_ABORT =6 , +ERT_CMD_STATE_SUBMITTED =7 , +ERT_CMD_STATE_TIMEOUT =8 , +ERT_CMD_STATE_NORESPONSE =9 , };/*
Signature · 1 line
2.55.0