From: Cristian Marussi <cristian.marussi@arm.com>
To: Luke Parkin <luke.parkin@arm.com>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org,
sudeep.holla@arm.com, cristian.marussi@arm.com
Subject: Re: [PATCH v3 4/5] firmware: arm_scmi: Create debugfs files for statistics
Date: Wed, 24 Jul 2024 15:26:21 +0100 [thread overview]
Message-ID: <ZqEPDY45bPuQK95W@pluto> (raw)
In-Reply-To: <20240715133751.2877197-5-luke.parkin@arm.com>
On Mon, Jul 15, 2024 at 02:37:50PM +0100, Luke Parkin wrote:
> Create debugfs files for the statistics in the scmi_debug_stats struct
>
> Signed-off-by: Luke Parkin <luke.parkin@arm.com>
Here you missed the seprator
---
before the changelog...so this will go into the final commit.
Thanks,
Cristian
> v2->v3
> Add extra statistics also added in v3
> v1->v2
> Only create stats pointer if stats are enabled
> Move stats debugfs creation into a seperate helper function
> ---
> drivers/firmware/arm_scmi/driver.c | 38 ++++++++++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
>
> diff --git a/drivers/firmware/arm_scmi/driver.c b/drivers/firmware/arm_scmi/driver.c
> index b22f104cda36..9378e2d8af4f 100644
> --- a/drivers/firmware/arm_scmi/driver.c
> +++ b/drivers/firmware/arm_scmi/driver.c
> @@ -2865,6 +2865,41 @@ static int scmi_device_request_notifier(struct notifier_block *nb,
> return NOTIFY_OK;
> }
>
> +static void scmi_debugfs_stats_setup(struct scmi_info *info,
> + struct dentry *trans)
> +{
> + struct dentry *stats;
> +
> + stats = debugfs_create_dir("stats", trans);
> +
> + debugfs_create_atomic_t("sent_ok", 0400, stats,
> + &info->dbg_stats[SENT_OK]);
> + debugfs_create_atomic_t("sent_fail", 0400, stats,
> + &info->dbg_stats[SENT_FAIL]);
> + debugfs_create_atomic_t("sent_fail_polling_unsupported", 0400, stats,
> + &info->dbg_stats[SENT_FAIL_POLLING_UNSUPPORTED]);
> + debugfs_create_atomic_t("sent_fail_channel_not_found", 0400, stats,
> + &info->dbg_stats[SENT_FAIL_CHANNEL_NOT_FOUND]);
> + debugfs_create_atomic_t("response_ok", 0400, stats,
> + &info->dbg_stats[RESPONSE_OK]);
> + debugfs_create_atomic_t("notif_ok", 0400, stats,
> + &info->dbg_stats[NOTIF_OK]);
> + debugfs_create_atomic_t("dlyd_resp_ok", 0400, stats,
> + &info->dbg_stats[DLYD_RESPONSE_OK]);
> + debugfs_create_atomic_t("xfers_resp_timeout", 0400, stats,
> + &info->dbg_stats[XFERS_RESPONSE_TIMEOUT]);
> + debugfs_create_atomic_t("response_polled_ok", 0400, stats,
> + &info->dbg_stats[RESPONSE_POLLED_OK]);
> + debugfs_create_atomic_t("err_msg_unexpected", 0400, stats,
> + &info->dbg_stats[ERR_MSG_UNEXPECTED]);
> + debugfs_create_atomic_t("err_msg_invalid", 0400, stats,
> + &info->dbg_stats[ERR_MSG_INVALID]);
> + debugfs_create_atomic_t("err_msg_nomem", 0400, stats,
> + &info->dbg_stats[ERR_MSG_NOMEM]);
> + debugfs_create_atomic_t("err_protocol", 0400, stats,
> + &info->dbg_stats[ERR_PROTOCOL]);
> +}
> +
> static void scmi_debugfs_common_cleanup(void *d)
> {
> struct scmi_debug_info *dbg = d;
> @@ -2931,6 +2966,9 @@ static struct scmi_debug_info *scmi_debugfs_common_setup(struct scmi_info *info)
> debugfs_create_u32("rx_max_msg", 0400, trans,
> (u32 *)&info->rx_minfo.max_msg);
>
> + if (IS_ENABLED(CONFIG_ARM_SCMI_DEBUG_STATISTICS))
> + scmi_debugfs_stats_setup(info, trans);
> +
> dbg->top_dentry = top_dentry;
>
> if (devm_add_action_or_reset(info->dev,
> --
> 2.34.1
>
>
next prev parent reply other threads:[~2024-07-24 14:26 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 13:37 [PATCH v3 0/5] Add Per-transport SCMI debug statistics Luke Parkin
2024-07-15 13:37 ` [PATCH v3 1/5] firmware: arm_scmi: Remove superfluous handle_to_scmi_info Luke Parkin
2024-07-24 13:07 ` Cristian Marussi
2024-07-15 13:37 ` [PATCH v3 2/5] firmware: arm_scmi: Add support for tracking statistics Luke Parkin
2024-07-24 13:40 ` Cristian Marussi
2024-07-15 13:37 ` [PATCH v3 3/5] firmware: arm_scmi: Track basic SCMI statistics Luke Parkin
2024-07-16 12:29 ` Peng Fan
2024-07-22 12:21 ` Luke Parkin
2024-07-24 14:24 ` Cristian Marussi
2024-07-24 14:21 ` Cristian Marussi
2024-07-24 14:39 ` Luke Parkin
2024-07-15 13:37 ` [PATCH v3 4/5] firmware: arm_scmi: Create debugfs files for statistics Luke Parkin
2024-07-24 14:26 ` Cristian Marussi [this message]
2024-07-15 13:37 ` [PATCH v3 5/5] firmware: arm_scmi: Reset statistics Luke Parkin
2024-07-24 14:41 ` Cristian Marussi
2024-07-24 14:46 ` [PATCH v3 0/5] Add Per-transport SCMI debug statistics Cristian Marussi
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=ZqEPDY45bPuQK95W@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luke.parkin@arm.com \
--cc=sudeep.holla@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.