summaryrefslogtreecommitdiffstats
path: root/drivers/bus
diff options
context:
space:
mode:
authorKrishna chaitanya chundru <quic_krichai@quicinc.com>2024-02-18 09:43:39 +0100
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2024-02-22 06:15:19 +0100
commita52354173bea2224009d52ed4439932260d389fb (patch)
tree9e5458f22c7d951a746419991694caed48dd4ed4 /drivers/bus
parentbus: mhi: ep: check the correct variable in mhi_ep_register_controller() (diff)
downloadlinux-a52354173bea2224009d52ed4439932260d389fb.tar.xz
linux-a52354173bea2224009d52ed4439932260d389fb.zip
bus: mhi: host: Change the trace string for the userspace tools mapping
User space tools can't map strings if we use directly, as the string address is internal to kernel. So add trace point strings for the user space tools to map strings properly. Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com> Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20240218-ftrace_string-v1-1-27da85c1f844@quicinc.com Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Diffstat (limited to 'drivers/bus')
-rw-r--r--drivers/bus/mhi/host/main.c4
-rw-r--r--drivers/bus/mhi/host/trace.h2
2 files changed, 4 insertions, 2 deletions
diff --git a/drivers/bus/mhi/host/main.c b/drivers/bus/mhi/host/main.c
index 2d38f6005da6..15d657af9b5b 100644
--- a/drivers/bus/mhi/host/main.c
+++ b/drivers/bus/mhi/host/main.c
@@ -1340,7 +1340,7 @@ static int mhi_update_channel_state(struct mhi_controller *mhi_cntrl,
enum mhi_cmd_type cmd = MHI_CMD_NOP;
int ret;
- trace_mhi_channel_command_start(mhi_cntrl, mhi_chan, to_state, "Updating");
+ trace_mhi_channel_command_start(mhi_cntrl, mhi_chan, to_state, TPS("Updating"));
switch (to_state) {
case MHI_CH_STATE_TYPE_RESET:
write_lock_irq(&mhi_chan->lock);
@@ -1407,7 +1407,7 @@ static int mhi_update_channel_state(struct mhi_controller *mhi_cntrl,
write_unlock_irq(&mhi_chan->lock);
}
- trace_mhi_channel_command_end(mhi_cntrl, mhi_chan, to_state, "Updated");
+ trace_mhi_channel_command_end(mhi_cntrl, mhi_chan, to_state, TPS("Updated"));
exit_channel_update:
mhi_cntrl->runtime_put(mhi_cntrl);
mhi_device_put(mhi_cntrl->mhi_dev);
diff --git a/drivers/bus/mhi/host/trace.h b/drivers/bus/mhi/host/trace.h
index d12a98d44272..368515dcb22d 100644
--- a/drivers/bus/mhi/host/trace.h
+++ b/drivers/bus/mhi/host/trace.h
@@ -84,6 +84,8 @@ DEV_ST_TRANSITION_LIST
#define dev_st_trans(a, b) { DEV_ST_TRANSITION_##a, b },
#define dev_st_trans_end(a, b) { DEV_ST_TRANSITION_##a, b }
+#define TPS(x) tracepoint_string(x)
+
TRACE_EVENT(mhi_gen_tre,
TP_PROTO(struct mhi_controller *mhi_cntrl, struct mhi_chan *mhi_chan,