mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 16:53:20 -04:00
firmware: qcom: scm: instrument SMC call path with tracepoints
Wire the five tracepoints defined in qcom_scm_trace.h into the SMC execution path by including the header with CREATE_TRACE_POINTS. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Yuvaraj Ranganathan <yuvaraj.ranganathan@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260522-scm-tracepoints-v2-2-e27cdbe0c585@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
This commit is contained in:
committed by
Bjorn Andersson
parent
f6bb2daa45
commit
41329e7236
@@ -5,6 +5,7 @@
|
||||
|
||||
obj-$(CONFIG_QCOM_SCM) += qcom-scm.o
|
||||
qcom-scm-objs += qcom_scm.o qcom_scm-smc.o qcom_scm-legacy.o
|
||||
CFLAGS_qcom_scm-smc.o := -I$(src)
|
||||
obj-$(CONFIG_QCOM_TZMEM) += qcom_tzmem.o
|
||||
obj-$(CONFIG_QCOM_QSEECOM) += qcom_qseecom.o
|
||||
obj-$(CONFIG_QCOM_QSEECOM_UEFISECAPP) += qcom_qseecom_uefisecapp.o
|
||||
|
||||
@@ -24,6 +24,9 @@ struct arm_smccc_args {
|
||||
unsigned long args[8];
|
||||
};
|
||||
|
||||
#define CREATE_TRACE_POINTS
|
||||
#include "qcom_scm_trace.h"
|
||||
|
||||
static DEFINE_MUTEX(qcom_scm_lock);
|
||||
|
||||
#define QCOM_SCM_EBUSY_WAIT_MS 30
|
||||
@@ -44,6 +47,7 @@ static void __scm_smc_do_quirk(const struct arm_smccc_args *smc,
|
||||
quirk.state.a6 = 0;
|
||||
|
||||
do {
|
||||
trace_scm_smc_request(a0, smc);
|
||||
arm_smccc_smc_quirk(a0, smc->args[1], smc->args[2],
|
||||
smc->args[3], smc->args[4], smc->args[5],
|
||||
quirk.state.a6, smc->args[7], res, &quirk);
|
||||
@@ -83,6 +87,7 @@ int scm_get_wq_ctx(u32 *wq_ctx, u32 *flags, u32 *more_pending)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
trace_scm_waitq_get_wq_ctx(get_wq_res.a1, get_wq_res.a2, get_wq_res.a3);
|
||||
*wq_ctx = get_wq_res.a1;
|
||||
*flags = get_wq_res.a2;
|
||||
*more_pending = get_wq_res.a3;
|
||||
@@ -105,10 +110,12 @@ static int __scm_smc_do_quirk_handle_waitq(struct device *dev, struct arm_smccc_
|
||||
wq_ctx = res->a1;
|
||||
smc_call_ctx = res->a2;
|
||||
|
||||
trace_scm_waitq_sleep(wq_ctx, smc_call_ctx);
|
||||
ret = qcom_scm_wait_for_wq_completion(wq_ctx);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
trace_scm_waitq_resume(smc_call_ctx);
|
||||
fill_wq_resume_args(&resume, smc_call_ctx);
|
||||
smc = &resume;
|
||||
}
|
||||
@@ -201,6 +208,9 @@ int __scm_smc_call(struct device *dev, const struct qcom_scm_desc *desc,
|
||||
}
|
||||
|
||||
ret = __scm_smc_do(dev, &smc, &smc_res, atomic);
|
||||
|
||||
trace_scm_smc_done(ret, smc.args[0], &smc_res);
|
||||
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user