mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Philip Radford <philip.radford@arm.com>
To: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, arm-scmi@vger.kernel.org
Cc: sudeep.holla@arm.com, cristian.marussi@arm.com,
	luke.parkin@arm.com, philip.radford@arm.com
Subject: [PATCH 1/4] firmware: arm_scmi: Add debug decrement counter
Date: Thu, 19 Jun 2025 12:20:01 +0000	[thread overview]
Message-ID: <20250619122004.3705976-2-philip.radford@arm.com> (raw)
In-Reply-To: <20250619122004.3705976-1-philip.radford@arm.com>

Create scmi_dec_count function to decrease any of the Arm SCMI
debug counters

Signed-off-by: Philip Radford <philip.radford@arm.com>
---
 drivers/firmware/arm_scmi/common.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/firmware/arm_scmi/common.h b/drivers/firmware/arm_scmi/common.h
index dab758c5fdea..c6495c4a0e8a 100644
--- a/drivers/firmware/arm_scmi/common.h
+++ b/drivers/firmware/arm_scmi/common.h
@@ -314,6 +314,12 @@ static inline void scmi_inc_count(atomic_t *arr, int stat)
 		atomic_inc(&arr[stat]);
 }
 
+static inline void scmi_dec_count(atomic_t *arr, int stat)
+{
+	if (IS_ENABLED(CONFIG_ARM_SCMI_DEBUG_COUNTERS))
+		atomic_dec(&arr[stat]);
+}
+
 enum scmi_bad_msg {
 	MSG_UNEXPECTED = -1,
 	MSG_INVALID = -2,
-- 
2.25.1


  reply	other threads:[~2025-06-19 12:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-19 12:20 [PATCH 0/4] firmware: arm_scmi: Add xfer inflight debug and trace Philip Radford
2025-06-19 12:20 ` Philip Radford [this message]
2025-06-19 14:32   ` [PATCH 1/4] firmware: arm_scmi: Add debug decrement counter Dan Carpenter
2025-06-26 11:10   ` Cristian Marussi
2025-06-19 12:20 ` [PATCH 2/4] firmware: arm_scmi: Add xfer_inflight counter Philip Radford
2025-06-26 11:15   ` Cristian Marussi
2025-06-19 12:20 ` [PATCH 3/4] include: trace: Add inflight_xfer counter tracepoint Philip Radford
2025-06-19 12:20 ` [PATCH 4/4] firmware: arm_scmi: Add new inflight tracing functionality Philip Radford
2025-06-19 14:37   ` Dan Carpenter
2025-06-26 11:17   ` Cristian Marussi
2025-06-20  8:46 ` [PATCH 0/4] firmware: arm_scmi: Add xfer inflight debug and trace Peng Fan
2025-06-20  9:27   ` Philip Radford
2025-06-24  4:22     ` Peng Fan
2025-06-26 11:37     ` Cristian Marussi
2025-06-30  2:00       ` Peng Fan
2025-06-26 11:18 ` 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=20250619122004.3705976-2-philip.radford@arm.com \
    --to=philip.radford@arm.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=cristian.marussi@arm.com \
    --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 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®