From: Sudeep Holla <sudeep.holla@arm.com>
To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Cc: Sudeep Holla <sudeep.holla@arm.com>,
Jim Quinlan <james.quinlan@broadcom.com>,
Lukasz Luba <lukasz.luba@arm.com>
Subject: [PATCH] firmware: arm_scmi: Use signed integer to report transfer status
Date: Tue, 9 Jun 2020 14:45:03 +0100 [thread overview]
Message-ID: <20200609134503.55860-1-sudeep.holla@arm.com> (raw)
Currently the trace event 'scmi_xfer_end' reports the status of the
transfer using the unsigned status field read from the firmware. This
may not be easy to interpret and also may miss to present any timeouts
that happen in the driver.
Let us use signed integer so that error values are emitted out after
they are mapped from firmware errors to standard linux error codes.
While at this, let us also include any timeouts in the driver itself.
Cc: Jim Quinlan <james.quinlan@broadcom.com>
Cc: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
drivers/firmware/arm_scmi/driver.c | 3 +--
include/trace/events/scmi.h | 6 +++---
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
index 7483cacf63f9..136acbe2f4a1 100644
--- a/drivers/firmware/arm_scmi/driver.c
+++ b/drivers/firmware/arm_scmi/driver.c
@@ -392,8 +392,7 @@ int scmi_do_xfer(const struct scmi_handle *handle, struct scmi_xfer *xfer)
info->desc->ops->mark_txdone(cinfo, ret);
trace_scmi_xfer_end(xfer->transfer_id, xfer->hdr.id,
- xfer->hdr.protocol_id, xfer->hdr.seq,
- xfer->hdr.status);
+ xfer->hdr.protocol_id, xfer->hdr.seq, ret);
return ret;
}
diff --git a/include/trace/events/scmi.h b/include/trace/events/scmi.h
index f076c430d243..f3a4b4d60714 100644
--- a/include/trace/events/scmi.h
+++ b/include/trace/events/scmi.h
@@ -35,7 +35,7 @@ TRACE_EVENT(scmi_xfer_begin,
TRACE_EVENT(scmi_xfer_end,
TP_PROTO(int transfer_id, u8 msg_id, u8 protocol_id, u16 seq,
- u32 status),
+ int status),
TP_ARGS(transfer_id, msg_id, protocol_id, seq, status),
TP_STRUCT__entry(
@@ -43,7 +43,7 @@ TRACE_EVENT(scmi_xfer_end,
__field(u8, msg_id)
__field(u8, protocol_id)
__field(u16, seq)
- __field(u32, status)
+ __field(int, status)
),
TP_fast_assign(
@@ -54,7 +54,7 @@ TRACE_EVENT(scmi_xfer_end,
__entry->status = status;
),
- TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u status=%u",
+ TP_printk("transfer_id=%d msg_id=%u protocol_id=%u seq=%u status=%d",
__entry->transfer_id, __entry->msg_id, __entry->protocol_id,
__entry->seq, __entry->status)
);
--
2.17.1
next prev reply other threads:[~2020-06-09 13:45 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-19 22:03 [PATCH] firmware: arm_scmi: Fix SCMI Generic Power Domain probing Cristian Marussi
2020-07-03 14:49 ` Sudeep Holla
2020-07-01 15:53 ` [PATCH v11 0/9] SCMI Notifications Core Support Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 1/9] firmware: arm_scmi: Add notification protocol-registration Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 2/9] firmware: arm_scmi: Add notification callbacks-registration Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 3/9] firmware: arm_scmi: Add notification dispatch and delivery Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 4/9] firmware: arm_scmi: Enable notification core Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 5/9] firmware: arm_scmi: Add power notifications support Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 6/9] firmware: arm_scmi: Add perf " Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 7/9] firmware: arm_scmi: Add sensor " Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 8/9] firmware: arm_scmi: Add reset " Cristian Marussi
2020-07-01 15:53 ` [PATCH v11 9/9] firmware: arm_scmi: Add base " Cristian Marussi
2020-07-03 14:49 ` [PATCH v11 0/9] SCMI Notifications Core Support Sudeep Holla
2020-06-17 9:43 ` [PATCH 1/2] firmware: arm_scmi: Add fast_switch_possible() api Nicola Mazzucato
2020-06-17 9:43 ` [PATCH 2/2] cpufreq: arm_scmi: Set fast_switch_possible conditionally Nicola Mazzucato
2020-06-17 12:47 ` Sudeep Holla
2020-06-18 6:14 ` Viresh Kumar
2020-06-18 8:08 ` Sudeep Holla
2020-06-18 9:54 ` Viresh Kumar
2020-07-03 14:49 ` [PATCH 1/2] firmware: arm_scmi: Add fast_switch_possible() api Sudeep Holla
2020-06-25 10:19 ` [PATCH] firmware: arm_scmi: Use HAVE_ARM_SMCCC_DISCOVERY instead of ARM_PSCI_FW Sudeep Holla
2020-07-03 14:49 ` Sudeep Holla
2020-06-09 13:45 ` Sudeep Holla [this message]
2020-06-09 14:00 ` [PATCH] firmware: arm_scmi: Use signed integer to report transfer status Lukasz Luba
2020-07-03 14:49 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200609134503.55860-1-sudeep.holla@arm.com \
--to=sudeep.holla@arm.com \
--cc=james.quinlan@broadcom.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukasz.luba@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®