From: "Maulik Shah (mkshah)" <quic_mkshah@quicinc.com>
To: Abel Vesa <abel.vesa@linaro.org>, Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>
Cc: Caleb Connolly <caleb.connolly@linaro.org>,
<linux-arm-msm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 2/2] soc: qcom_stats: Add dynamic debugfs entries for subsystems
Date: Tue, 23 Aug 2022 17:17:05 +0530 [thread overview]
Message-ID: <4d3edb1f-d8a7-8335-78a7-fdfe7c7a8c20@quicinc.com> (raw)
In-Reply-To: <20220818142215.2282365-2-abel.vesa@linaro.org>
Hi,
Thanks for the patch.
> +static void qcom_register_subsystem_notifiers(struct qcom_stats_priv *stats)
> +{
> + struct device *dev = &stats->dev;
> + int i;
> +
> + for (i = 0; i < ARRAY_SIZE(subsystems); i++) {
> + const struct subsystem_data *subsystem = &subsystems[i];
> + struct subsystem_priv *ss_priv = &stats->ss_priv[i];
> +
> + ss_priv->subsystem = subsystem;
> + ss_priv->root = stats->root;
> + ss_priv->nb.notifier_call = qcom_stats_subsys_ssr_notify;
> + ss_priv->notifier = qcom_register_ssr_notifier(subsystem->name, &ss_priv->nb);
The subsystem->name passed should match the subsystem name already
registered with SSR.
The names in below table don't match as of now. for e.g. modem uses mpss
name.
static const struct subsystem_data subsystems[] = {
{ "modem", 605, 1 },
{ "wpss", 605, 13 },
{ "adsp", 606, 2 },
{ "cdsp", 607, 5 },
{ "slpi", 608, 3 },
{ "gpu", 609, 0 },
{ "display", 610, 0 },
{ "adsp_island", 613, 2 },
{ "slpi_island", 613, 3 },
};
struct subsystem_data {
const char *name;
u32 smem_item;
u32 pid;
+ const char *ssr_name;
};
Can you add one more entry in above struct with the 'ssr_name' for
subsystem.
For the adsp_island stat you can re-use the lpass subsystem notification
and create/destroy debugfs stats files for both adsp and adsp_island
stats, similarly for slpi_island stats comes from slpi.
The gpu and display don't have any pil/ssr and hence same notification
won't work for them, however today both of these are unused, so you may
want to remove them from above table.
Note that In downstream we have 'apps' stats as well in above for which
no registration with SSR is required. May be need to leave 'ssr_name'
uninitialized for apps/gpu/display and skip register for them.
Thanks,
Maulik
prev parent reply other threads:[~2022-08-23 14:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 14:22 [RFC 1/2] soc: qcom_stats: Add state container Abel Vesa
2022-08-18 14:22 ` [RFC 2/2] soc: qcom_stats: Add dynamic debugfs entries for subsystems Abel Vesa
2022-08-18 18:04 ` Abel Vesa
2022-08-23 11:47 ` Maulik Shah (mkshah) [this message]
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=4d3edb1f-d8a7-8335-78a7-fdfe7c7a8c20@quicinc.com \
--to=quic_mkshah@quicinc.com \
--cc=abel.vesa@linaro.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=caleb.connolly@linaro.org \
--cc=konrad.dybcio@somainline.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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®