diff options
| author | Cristian Marussi <cristian.marussi@arm.com> | 2024-03-25 20:46:17 +0000 |
|---|---|---|
| committer | Sudeep Holla <sudeep.holla@arm.com> | 2024-03-26 11:19:38 +0000 |
| commit | 5dc0e0b1f0ea2b55031f84a365962b9b45869b98 (patch) | |
| tree | 15bc3d822140c30abe63c3ef6f5ee019377649c7 /drivers/firmware/arm_scmi/common.h | |
| parent | da251ce210617fa31aa2a65ba7f28e1c584a1938 (diff) | |
firmware: arm_scmi: Add helper to trace bad messages
Upon reception of malformed and unexpected timed-out SCMI messages, it is
not possible to trace those bad messages in their entirety, because usually
we cannot even retrieve the payload, or it is just not reliable.
Add a helper to trace at least the content of the header of the received
message while associating a meaningful tag and error code.
Signed-off-by: Cristian Marussi <cristian.marussi@arm.com>
Link: https://lore.kernel.org/r/20240325204620.1437237-3-cristian.marussi@arm.com
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi/common.h')
| -rw-r--r-- | drivers/firmware/arm_scmi/common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h index 6affbfdd1dec..b5ac25dbc1ca 100644 --- a/drivers/firmware/arm_scmi/common.h +++ b/drivers/firmware/arm_scmi/common.h @@ -301,6 +301,17 @@ extern const struct scmi_desc scmi_optee_desc; void scmi_rx_callback(struct scmi_chan_info *cinfo, u32 msg_hdr, void *priv); +enum scmi_bad_msg { + MSG_UNEXPECTED = -1, + MSG_INVALID = -2, + MSG_UNKNOWN = -3, + MSG_NOMEM = -4, + MSG_MBOX_SPURIOUS = -5, +}; + +void scmi_bad_message_trace(struct scmi_chan_info *cinfo, u32 msg_hdr, + enum scmi_bad_msg err); + /* shmem related declarations */ struct scmi_shared_mem; |
