Skip to contentSkip to conversation

clk: trace: Trace range functions

PATCH Applied Maxime Ripard 2 participants 2 messages Dec 7, 2020 – Dec 17, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 clk: trace: Trace range functions

The clk_set_range functions don't have any tracepoints even though it might be useful. Fix this.

---

Changes from v1:
- Call the trace functions after the check for the clk pointer

---
 drivers/clk/clk.c          |  6 ++++++
 include/trace/events/clk.h | 44 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 50 insertions(+)
drivers/clk/clk.c +6 -0
index f83dac54ed85..b98415d280c8 100644
@@ -2314,6 +2314,8 @@ int clk_set_rate_range(struct clk *clk, unsigned long min, unsigned long max)
 	if (!clk)
 		return 0;
 
+	trace_clk_set_rate_range(clk->core, min, max);
+
 	if (min > max) {
 		pr_err("%s: clk %s dev %s con %s: invalid range [%lu, %lu]\n",
 		       __func__, clk->core->name, clk->dev_id, clk->con_id,
@@ -2381,6 +2383,8 @@ int clk_set_min_rate(struct clk *clk, unsigned long rate)
 	if (!clk)
 		return 0;
 
+	trace_clk_set_min_rate(clk->core, rate);
+
 	return clk_set_rate_range(clk, rate, clk->max_rate);
 }
 EXPORT_SYMBOL_GPL(clk_set_min_rate);
@@ -2397,6 +2401,8 @@ int clk_set_max_rate(struct clk *clk, unsigned long rate)
 	if (!clk)
 		return 0;
 
+	trace_clk_set_max_rate(clk->core, rate);
+
 	return clk_set_rate_range(clk, clk->min_rate, rate);
 }
 EXPORT_SYMBOL_GPL(clk_set_max_rate);
include/trace/events/clk.h +44 -0

50 lines not on this page · raw message

Signature · 1 line
2.28.0
maintainer Applied
#1 lore raw

Quoting Maxime Ripard (2020-12-07 02:50:50)

Quoted 6 lines

The clk_set_range functions don't have any tracepoints even though it might be useful. Fix this.

---

Applied to clk-next