public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
@ 2024-05-31 10:54 Shivnandan Kumar
  2024-05-31 20:29 ` kernel test robot
  2024-06-01  1:28 ` kernel test robot
  0 siblings, 2 replies; 9+ messages in thread
From: Shivnandan Kumar @ 2024-05-31 10:54 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio,
	Ramakrishna Gottimukkula
  Cc: linux-kernel, linux-arm-msm, Shivnandan Kumar

Add tracepoint for tracing the measured traffic, up_kbps
and down_kbps in bwmon. This information is valuable for
understanding what bwmon hw measures at the system cache
level and at the DDR level which is helpful in debugging
bwmon behavior.

Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
---
 MAINTAINERS                        |  1 +
 drivers/soc/qcom/icc-bwmon.c       |  4 ++-
 drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
 3 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 9ed4d3868539..dc864e3870b1 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18135,6 +18135,7 @@ M:	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
 L:	linux-arm-msm@vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
+F:	drivers/soc/qcom/trace_icc-bwmon.h
 F:	drivers/soc/qcom/icc-bwmon.c

 QUALCOMM IOMMU
diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
index 656706259353..dedf0070654b 100644
--- a/drivers/soc/qcom/icc-bwmon.c
+++ b/drivers/soc/qcom/icc-bwmon.c
@@ -17,6 +17,8 @@
 #include <linux/pm_opp.h>
 #include <linux/regmap.h>
 #include <linux/sizes.h>
+#define CREATE_TRACE_POINTS
+#include "trace_icc-bwmon.h"

 /*
  * The BWMON samples data throughput within 'sample_ms' time. With three
@@ -681,7 +683,7 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)

 	if (bwmon->target_kbps == bwmon->current_kbps)
 		goto out;
-
+	trace_qcom_bwmon_update(dev_name(bwmon->dev), bw_kbps, up_kbps, down_kbps);
 	dev_pm_opp_set_opp(bwmon->dev, target_opp);
 	bwmon->current_kbps = bwmon->target_kbps;

diff --git a/drivers/soc/qcom/trace_icc-bwmon.h b/drivers/soc/qcom/trace_icc-bwmon.h
new file mode 100644
index 000000000000..977e46ade4b8
--- /dev/null
+++ b/drivers/soc/qcom/trace_icc-bwmon.h
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM icc_bwmon
+
+#if !defined(_TRACE_ICC_BWMON_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_ICC_BWMON_H
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(qcom_bwmon_update,
+
+	TP_PROTO(const char *name,
+		 unsigned int meas_kbps, unsigned int up_kbps, unsigned int down_kbps),
+
+	TP_ARGS(name, meas_kbps, up_kbps, down_kbps),
+
+	TP_STRUCT__entry(
+		__string(name, name)
+		__field(unsigned int, meas_kbps)
+		__field(unsigned int, up_kbps)
+		__field(unsigned int, down_kbps)
+	),
+
+	TP_fast_assign(
+		__assign_str(name, name);
+		__entry->meas_kbps = meas_kbps;
+		__entry->up_kbps = up_kbps;
+		__entry->down_kbps = down_kbps;
+	),
+
+	TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
+		__get_str(name),
+		__entry->meas_kbps,
+		__entry->up_kbps,
+		__entry->down_kbps)
+);
+
+#endif /* _TRACE_ICC_BWMON_H */
+
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH ../../drivers/soc/qcom/
+
+#undef TRACE_INCLUDE_FILE
+#define TRACE_INCLUDE_FILE trace_icc-bwmon
+
+#include <trace/define_trace.h>
--
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
  2024-05-31 10:54 [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread Shivnandan Kumar
@ 2024-05-31 20:29 ` kernel test robot
  2024-06-01  1:28 ` kernel test robot
  1 sibling, 0 replies; 9+ messages in thread
From: kernel test robot @ 2024-05-31 20:29 UTC (permalink / raw)
  To: Shivnandan Kumar, Krzysztof Kozlowski, Bjorn Andersson,
	Konrad Dybcio, Ramakrishna Gottimukkula
  Cc: oe-kbuild-all, linux-kernel, linux-arm-msm, Shivnandan Kumar

Hi Shivnandan,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.10-rc1 next-20240531]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Shivnandan-Kumar/soc-qcom-icc-bwmon-Add-tracepoints-in-bwmon_intr_thread/20240531-185658
base:   linus/master
patch link:    https://lore.kernel.org/r/20240531105404.879267-1-quic_kshivnan%40quicinc.com
patch subject: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20240601/202406010409.xiR31FVt-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240601/202406010409.xiR31FVt-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406010409.xiR31FVt-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from include/trace/trace_events.h:419,
                    from include/trace/define_trace.h:102,
                    from drivers/soc/qcom/trace_icc-bwmon.h:49,
                    from drivers/soc/qcom/icc-bwmon.c:21:
>> include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h:39:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
      39 | );
         | ^~             
   In file included from include/trace/trace_events.h:375:
   include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
      34 | #define __assign_str(dst)                                               \
         | 
   include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h: In function 'trace_event_raw_event_qcom_bwmon_update':
>> include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h:28:17: error: '__assign_str' undeclared (first use in this function)
      28 |                 __assign_str(name, name);
         |                 ^~~~~~~~~~~~
   include/trace/trace_events.h:402:11: note: in definition of macro 'DECLARE_EVENT_CLASS'
     402 |         { assign; }                                                     \
         |           ^~~~~~
   include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
      44 |                              PARAMS(assign),                   \
         |                              ^~~~~~
   include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h:13:1: note: in expansion of macro 'TRACE_EVENT'
      13 | TRACE_EVENT(qcom_bwmon_update,
         | ^~~~~~~~~~~
   include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h:27:9: note: in expansion of macro 'TP_fast_assign'
      27 |         TP_fast_assign(
         |         ^~~~~~~~~~~~~~
   include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h:28:17: note: each undeclared identifier is reported only once for each function it appears in
      28 |                 __assign_str(name, name);
         |                 ^~~~~~~~~~~~
   include/trace/trace_events.h:402:11: note: in definition of macro 'DECLARE_EVENT_CLASS'
     402 |         { assign; }                                                     \
         |           ^~~~~~
   include/trace/trace_events.h:44:30: note: in expansion of macro 'PARAMS'
      44 |                              PARAMS(assign),                   \
         |                              ^~~~~~
   include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h:13:1: note: in expansion of macro 'TRACE_EVENT'
      13 | TRACE_EVENT(qcom_bwmon_update,
         | ^~~~~~~~~~~
   include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h:27:9: note: in expansion of macro 'TP_fast_assign'
      27 |         TP_fast_assign(
         |         ^~~~~~~~~~~~~~
   In file included from include/trace/trace_events.h:469:
   include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h: At top level:
>> include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h:39:1: error: macro "__assign_str" passed 2 arguments, but takes just 1
      39 | );
         | ^~             
   include/trace/stages/stage6_event_callback.h:34: note: macro "__assign_str" defined here
      34 | #define __assign_str(dst)                                               \
         | 


vim +/__assign_str +39 include/trace/../../drivers/soc/qcom//trace_icc-bwmon.h

    14	
    15		TP_PROTO(const char *name,
    16			 unsigned int meas_kbps, unsigned int up_kbps, unsigned int down_kbps),
    17	
    18		TP_ARGS(name, meas_kbps, up_kbps, down_kbps),
    19	
    20		TP_STRUCT__entry(
    21			__string(name, name)
    22			__field(unsigned int, meas_kbps)
    23			__field(unsigned int, up_kbps)
    24			__field(unsigned int, down_kbps)
    25		),
    26	
    27		TP_fast_assign(
  > 28			__assign_str(name, name);
    29			__entry->meas_kbps = meas_kbps;
    30			__entry->up_kbps = up_kbps;
    31			__entry->down_kbps = down_kbps;
    32		),
    33	
    34		TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
    35			__get_str(name),
    36			__entry->meas_kbps,
    37			__entry->up_kbps,
    38			__entry->down_kbps)
  > 39	);
    40	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
  2024-05-31 10:54 [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread Shivnandan Kumar
  2024-05-31 20:29 ` kernel test robot
@ 2024-06-01  1:28 ` kernel test robot
  1 sibling, 0 replies; 9+ messages in thread
From: kernel test robot @ 2024-06-01  1:28 UTC (permalink / raw)
  To: Shivnandan Kumar, Krzysztof Kozlowski, Bjorn Andersson,
	Konrad Dybcio, Ramakrishna Gottimukkula
  Cc: llvm, oe-kbuild-all, linux-kernel, linux-arm-msm,
	Shivnandan Kumar

Hi Shivnandan,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.10-rc1 next-20240531]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Shivnandan-Kumar/soc-qcom-icc-bwmon-Add-tracepoints-in-bwmon_intr_thread/20240531-185658
base:   linus/master
patch link:    https://lore.kernel.org/r/20240531105404.879267-1-quic_kshivnan%40quicinc.com
patch subject: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
config: hexagon-allmodconfig (https://download.01.org/0day-ci/archive/20240601/202406010720.b2TIAmY8-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project bafda89a0944d947fc4b3b5663185e07a397ac30)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240601/202406010720.b2TIAmY8-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202406010720.b2TIAmY8-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/soc/qcom/icc-bwmon.c:11:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:548:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     548 |         val = __raw_readb(PCI_IOBASE + addr);
         |                           ~~~~~~~~~~ ^
   include/asm-generic/io.h:561:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     561 |         val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:37:51: note: expanded from macro '__le16_to_cpu'
      37 | #define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
         |                                                   ^
   In file included from drivers/soc/qcom/icc-bwmon.c:11:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:574:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     574 |         val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
         |                                                         ~~~~~~~~~~ ^
   include/uapi/linux/byteorder/little_endian.h:35:51: note: expanded from macro '__le32_to_cpu'
      35 | #define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
         |                                                   ^
   In file included from drivers/soc/qcom/icc-bwmon.c:11:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from ./arch/hexagon/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/hexagon/include/asm/io.h:328:
   include/asm-generic/io.h:585:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     585 |         __raw_writeb(value, PCI_IOBASE + addr);
         |                             ~~~~~~~~~~ ^
   include/asm-generic/io.h:595:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     595 |         __raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   include/asm-generic/io.h:605:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     605 |         __raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
         |                                                       ~~~~~~~~~~ ^
   In file included from drivers/soc/qcom/icc-bwmon.c:21:
   In file included from drivers/soc/qcom/trace_icc-bwmon.h:49:
   In file included from include/trace/define_trace.h:102:
   In file included from include/trace/trace_events.h:21:
   In file included from include/linux/trace_events.h:6:
   In file included from include/linux/ring_buffer.h:5:
   In file included from include/linux/mm.h:2253:
   include/linux/vmstat.h:514:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     514 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from drivers/soc/qcom/icc-bwmon.c:21:
   In file included from drivers/soc/qcom/trace_icc-bwmon.h:49:
   In file included from include/trace/define_trace.h:102:
   In file included from include/trace/trace_events.h:419:
>> drivers/soc/qcom/trace_icc-bwmon.h:28:22: error: too many arguments provided to function-like macro invocation
      28 |                 __assign_str(name, name);
         |                                    ^
   include/trace/stages/stage6_event_callback.h:34:9: note: macro '__assign_str' defined here
      34 | #define __assign_str(dst)                                               \
         |         ^
   In file included from drivers/soc/qcom/icc-bwmon.c:21:
   In file included from drivers/soc/qcom/trace_icc-bwmon.h:49:
   In file included from include/trace/define_trace.h:102:
   In file included from include/trace/trace_events.h:419:
>> drivers/soc/qcom/trace_icc-bwmon.h:28:3: error: use of undeclared identifier '__assign_str'
      28 |                 __assign_str(name, name);
         |                 ^
   In file included from drivers/soc/qcom/icc-bwmon.c:21:
   In file included from drivers/soc/qcom/trace_icc-bwmon.h:49:
   In file included from include/trace/define_trace.h:102:
   In file included from include/trace/trace_events.h:469:
>> drivers/soc/qcom/trace_icc-bwmon.h:28:22: error: too many arguments provided to function-like macro invocation
      28 |                 __assign_str(name, name);
         |                                    ^
   include/trace/stages/stage6_event_callback.h:34:9: note: macro '__assign_str' defined here
      34 | #define __assign_str(dst)                                               \
         |         ^
   In file included from drivers/soc/qcom/icc-bwmon.c:21:
   In file included from drivers/soc/qcom/trace_icc-bwmon.h:49:
   In file included from include/trace/define_trace.h:103:
   In file included from include/trace/perf.h:75:
>> drivers/soc/qcom/trace_icc-bwmon.h:28:22: error: too many arguments provided to function-like macro invocation
      28 |                 __assign_str(name, name);
         |                                    ^
   include/trace/stages/stage6_event_callback.h:34:9: note: macro '__assign_str' defined here
      34 | #define __assign_str(dst)                                               \
         |         ^
   In file included from drivers/soc/qcom/icc-bwmon.c:21:
   In file included from drivers/soc/qcom/trace_icc-bwmon.h:49:
   In file included from include/trace/define_trace.h:103:
   In file included from include/trace/perf.h:75:
>> drivers/soc/qcom/trace_icc-bwmon.h:28:3: error: use of undeclared identifier '__assign_str'
      28 |                 __assign_str(name, name);
         |                 ^
   7 warnings and 5 errors generated.


vim +28 drivers/soc/qcom/trace_icc-bwmon.h

    14	
    15		TP_PROTO(const char *name,
    16			 unsigned int meas_kbps, unsigned int up_kbps, unsigned int down_kbps),
    17	
    18		TP_ARGS(name, meas_kbps, up_kbps, down_kbps),
    19	
    20		TP_STRUCT__entry(
    21			__string(name, name)
    22			__field(unsigned int, meas_kbps)
    23			__field(unsigned int, up_kbps)
    24			__field(unsigned int, down_kbps)
    25		),
    26	
    27		TP_fast_assign(
  > 28			__assign_str(name, name);
    29			__entry->meas_kbps = meas_kbps;
    30			__entry->up_kbps = up_kbps;
    31			__entry->down_kbps = down_kbps;
    32		),
    33	
    34		TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
    35			__get_str(name),
    36			__entry->meas_kbps,
    37			__entry->up_kbps,
    38			__entry->down_kbps)
    39	);
    40	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
@ 2024-06-19 13:51 Shivnandan Kumar
  2024-06-19 19:16 ` Konrad Dybcio
  0 siblings, 1 reply; 9+ messages in thread
From: Shivnandan Kumar @ 2024-06-19 13:51 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Bjorn Andersson, Konrad Dybcio
  Cc: linux-kernel, linux-arm-msm, quic_rgottimu, Shivnandan Kumar

Add tracepoint for tracing the measured traffic in kbps,
up_kbps and down_kbps in bwmon. This information is valuable
for understanding what bwmon hw measures at the system cache
level and at the DDR level which is helpful in debugging
bwmon behavior.

Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
---
 MAINTAINERS                        |  1 +
 drivers/soc/qcom/icc-bwmon.c       |  7 +++--
 drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
 3 files changed, 55 insertions(+), 2 deletions(-)
 create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h

diff --git a/MAINTAINERS b/MAINTAINERS
index 242fc612fbc5..1b410c0183bb 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18573,6 +18573,7 @@ M:	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
 L:	linux-arm-msm@vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
+F:	drivers/soc/qcom/trace_icc-bwmon.h
 F:	drivers/soc/qcom/icc-bwmon.c

 QUALCOMM IOMMU
diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
index fb323b3364db..9b5ac1e62673 100644
--- a/drivers/soc/qcom/icc-bwmon.c
+++ b/drivers/soc/qcom/icc-bwmon.c
@@ -17,6 +17,8 @@
 #include <linux/pm_opp.h>
 #include <linux/regmap.h>
 #include <linux/sizes.h>
+#define CREATE_TRACE_POINTS
+#include "trace_icc-bwmon.h"

 /*
  * The BWMON samples data throughput within 'sample_ms' time. With three
@@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
 	struct icc_bwmon *bwmon = dev_id;
 	unsigned int irq_enable = 0;
 	struct dev_pm_opp *opp, *target_opp;
-	unsigned int bw_kbps, up_kbps, down_kbps;
+	unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;

-	bw_kbps = bwmon->target_kbps;
+	meas_kbps = bw_kbps = bwmon->target_kbps;

 	target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
 	if (IS_ERR(target_opp) && PTR_ERR(target_opp) == -ERANGE)
@@ -679,6 +681,7 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
 	bwmon_clear_irq(bwmon);
 	bwmon_enable(bwmon, irq_enable);

+	trace_qcom_bwmon_update(dev_name(bwmon->dev), meas_kbps, up_kbps, down_kbps);
 	if (bwmon->target_kbps == bwmon->current_kbps)
 		goto out;

diff --git a/drivers/soc/qcom/trace_icc-bwmon.h b/drivers/soc/qcom/trace_icc-bwmon.h
new file mode 100644
index 000000000000..5bdba0b77b72
--- /dev/null
+++ b/drivers/soc/qcom/trace_icc-bwmon.h
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
+ */
+
+#undef TRACE_SYSTEM
+#define TRACE_SYSTEM icc_bwmon
+
+#if !defined(_TRACE_ICC_BWMON_H) || defined(TRACE_HEADER_MULTI_READ)
+#define _TRACE_ICC_BWMON_H
+#include <linux/tracepoint.h>
+
+TRACE_EVENT(qcom_bwmon_update,
+
+	TP_PROTO(const char *name,
+		 unsigned int meas_kbps, unsigned int up_kbps, unsigned int down_kbps),
+
+	TP_ARGS(name, meas_kbps, up_kbps, down_kbps),
+
+	TP_STRUCT__entry(
+		__string(name, name)
+		__field(unsigned int, meas_kbps)
+		__field(unsigned int, up_kbps)
+		__field(unsigned int, down_kbps)
+	),
+
+	TP_fast_assign(
+		__assign_str(name);
+		__entry->meas_kbps = meas_kbps;
+		__entry->up_kbps = up_kbps;
+		__entry->down_kbps = down_kbps;
+	),
+
+	TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
+		__get_str(name),
+		__entry->meas_kbps,
+		__entry->up_kbps,
+		__entry->down_kbps)
+);
+
+#endif /* _TRACE_ICC_BWMON_H */
+
+#undef TRACE_INCLUDE_PATH
+#define TRACE_INCLUDE_PATH ../../drivers/soc/qcom/
+
+#undef TRACE_INCLUDE_FILE
+#define TRACE_INCLUDE_FILE trace_icc-bwmon
+
+#include <trace/define_trace.h>
--
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
  2024-06-19 13:51 Shivnandan Kumar
@ 2024-06-19 19:16 ` Konrad Dybcio
  2024-06-20  8:55   ` Shivnandan Kumar
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Dybcio @ 2024-06-19 19:16 UTC (permalink / raw)
  To: Shivnandan Kumar, Krzysztof Kozlowski, Bjorn Andersson
  Cc: linux-kernel, linux-arm-msm, quic_rgottimu



On 6/19/24 15:51, Shivnandan Kumar wrote:
> Add tracepoint for tracing the measured traffic in kbps,
> up_kbps and down_kbps in bwmon. This information is valuable
> for understanding what bwmon hw measures at the system cache
> level and at the DDR level which is helpful in debugging
> bwmon behavior.
> 
> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
> ---
>   MAINTAINERS                        |  1 +
>   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>   3 files changed, 55 insertions(+), 2 deletions(-)
>   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index 242fc612fbc5..1b410c0183bb 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -18573,6 +18573,7 @@ M:	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>   L:	linux-arm-msm@vger.kernel.org
>   S:	Maintained
>   F:	Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
> +F:	drivers/soc/qcom/trace_icc-bwmon.h
>   F:	drivers/soc/qcom/icc-bwmon.c
> 
>   QUALCOMM IOMMU
> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
> index fb323b3364db..9b5ac1e62673 100644
> --- a/drivers/soc/qcom/icc-bwmon.c
> +++ b/drivers/soc/qcom/icc-bwmon.c
> @@ -17,6 +17,8 @@
>   #include <linux/pm_opp.h>
>   #include <linux/regmap.h>
>   #include <linux/sizes.h>
> +#define CREATE_TRACE_POINTS
> +#include "trace_icc-bwmon.h"
> 
>   /*
>    * The BWMON samples data throughput within 'sample_ms' time. With three
> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
>   	struct icc_bwmon *bwmon = dev_id;
>   	unsigned int irq_enable = 0;
>   	struct dev_pm_opp *opp, *target_opp;
> -	unsigned int bw_kbps, up_kbps, down_kbps;
> +	unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
> 
> -	bw_kbps = bwmon->target_kbps;
> +	meas_kbps = bw_kbps = bwmon->target_kbps;
> 
>   	target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);

This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
(uninitialized variable) value

Konrad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
  2024-06-19 19:16 ` Konrad Dybcio
@ 2024-06-20  8:55   ` Shivnandan Kumar
  2024-06-20 10:48     ` Konrad Dybcio
  0 siblings, 1 reply; 9+ messages in thread
From: Shivnandan Kumar @ 2024-06-20  8:55 UTC (permalink / raw)
  To: Konrad Dybcio, Krzysztof Kozlowski, Bjorn Andersson
  Cc: linux-kernel, linux-arm-msm, quic_rgottimu



On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
> 
> 
> On 6/19/24 15:51, Shivnandan Kumar wrote:
>> Add tracepoint for tracing the measured traffic in kbps,
>> up_kbps and down_kbps in bwmon. This information is valuable
>> for understanding what bwmon hw measures at the system cache
>> level and at the DDR level which is helpful in debugging
>> bwmon behavior.
>>
>> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
>> ---
>>   MAINTAINERS                        |  1 +
>>   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>>   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>>   3 files changed, 55 insertions(+), 2 deletions(-)
>>   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
>>
>> diff --git a/MAINTAINERS b/MAINTAINERS
>> index 242fc612fbc5..1b410c0183bb 100644
>> --- a/MAINTAINERS
>> +++ b/MAINTAINERS
>> @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski 
>> <krzysztof.kozlowski@linaro.org>
>>   L:    linux-arm-msm@vger.kernel.org
>>   S:    Maintained
>>   F:    
>> Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
>> +F:    drivers/soc/qcom/trace_icc-bwmon.h
>>   F:    drivers/soc/qcom/icc-bwmon.c
>>
>>   QUALCOMM IOMMU
>> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
>> index fb323b3364db..9b5ac1e62673 100644
>> --- a/drivers/soc/qcom/icc-bwmon.c
>> +++ b/drivers/soc/qcom/icc-bwmon.c
>> @@ -17,6 +17,8 @@
>>   #include <linux/pm_opp.h>
>>   #include <linux/regmap.h>
>>   #include <linux/sizes.h>
>> +#define CREATE_TRACE_POINTS
>> +#include "trace_icc-bwmon.h"
>>
>>   /*
>>    * The BWMON samples data throughput within 'sample_ms' time. With 
>> three
>> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void 
>> *dev_id)
>>       struct icc_bwmon *bwmon = dev_id;
>>       unsigned int irq_enable = 0;
>>       struct dev_pm_opp *opp, *target_opp;
>> -    unsigned int bw_kbps, up_kbps, down_kbps;
>> +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
>>
>> -    bw_kbps = bwmon->target_kbps;
>> +    meas_kbps = bw_kbps = bwmon->target_kbps;
>>
>>       target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
> 
> This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
> (uninitialized variable) value
> 

Thank you for reviewing the patch.
I didn't get it, still the variable "bw_kbps" is being initialized along 
with "meas_kbps". Which variable are you referring to as being fed to 
dev_pm_opp_find_bw_ceil  with an uninitialized value?

Thanks
Shivnandan

> Konrad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
  2024-06-20  8:55   ` Shivnandan Kumar
@ 2024-06-20 10:48     ` Konrad Dybcio
  2024-06-20 20:36       ` Dmitry Baryshkov
  0 siblings, 1 reply; 9+ messages in thread
From: Konrad Dybcio @ 2024-06-20 10:48 UTC (permalink / raw)
  To: Shivnandan Kumar, Krzysztof Kozlowski, Bjorn Andersson
  Cc: linux-kernel, linux-arm-msm, quic_rgottimu



On 6/20/24 10:55, Shivnandan Kumar wrote:
> 
> 
> On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
>>
>>
>> On 6/19/24 15:51, Shivnandan Kumar wrote:
>>> Add tracepoint for tracing the measured traffic in kbps,
>>> up_kbps and down_kbps in bwmon. This information is valuable
>>> for understanding what bwmon hw measures at the system cache
>>> level and at the DDR level which is helpful in debugging
>>> bwmon behavior.
>>>
>>> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
>>> ---
>>>   MAINTAINERS                        |  1 +
>>>   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>>>   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>>>   3 files changed, 55 insertions(+), 2 deletions(-)
>>>   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
>>>
>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>> index 242fc612fbc5..1b410c0183bb 100644
>>> --- a/MAINTAINERS
>>> +++ b/MAINTAINERS
>>> @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>   L:    linux-arm-msm@vger.kernel.org
>>>   S:    Maintained
>>>   F: Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
>>> +F:    drivers/soc/qcom/trace_icc-bwmon.h
>>>   F:    drivers/soc/qcom/icc-bwmon.c
>>>
>>>   QUALCOMM IOMMU
>>> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
>>> index fb323b3364db..9b5ac1e62673 100644
>>> --- a/drivers/soc/qcom/icc-bwmon.c
>>> +++ b/drivers/soc/qcom/icc-bwmon.c
>>> @@ -17,6 +17,8 @@
>>>   #include <linux/pm_opp.h>
>>>   #include <linux/regmap.h>
>>>   #include <linux/sizes.h>
>>> +#define CREATE_TRACE_POINTS
>>> +#include "trace_icc-bwmon.h"
>>>
>>>   /*
>>>    * The BWMON samples data throughput within 'sample_ms' time. With three
>>> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
>>>       struct icc_bwmon *bwmon = dev_id;
>>>       unsigned int irq_enable = 0;
>>>       struct dev_pm_opp *opp, *target_opp;
>>> -    unsigned int bw_kbps, up_kbps, down_kbps;
>>> +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
>>>
>>> -    bw_kbps = bwmon->target_kbps;
>>> +    meas_kbps = bw_kbps = bwmon->target_kbps;
>>>
>>>       target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
>>
>> This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
>> (uninitialized variable) value
>>
> 
> Thank you for reviewing the patch.
> I didn't get it, still the variable "bw_kbps" is being initialized along with "meas_kbps". Which variable are you referring to as being fed to dev_pm_opp_find_bw_ceil  with an uninitialized value?

Oh this one's on me, I skipped over the middle assignment.. Sorry!

Konrad

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
  2024-06-20 10:48     ` Konrad Dybcio
@ 2024-06-20 20:36       ` Dmitry Baryshkov
  2024-06-24 11:11         ` Shivnandan Kumar
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Baryshkov @ 2024-06-20 20:36 UTC (permalink / raw)
  To: Konrad Dybcio
  Cc: Shivnandan Kumar, Krzysztof Kozlowski, Bjorn Andersson,
	linux-kernel, linux-arm-msm, quic_rgottimu

On Thu, Jun 20, 2024 at 12:48:04PM GMT, Konrad Dybcio wrote:
> 
> 
> On 6/20/24 10:55, Shivnandan Kumar wrote:
> > 
> > 
> > On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
> > > 
> > > 
> > > On 6/19/24 15:51, Shivnandan Kumar wrote:
> > > > Add tracepoint for tracing the measured traffic in kbps,
> > > > up_kbps and down_kbps in bwmon. This information is valuable
> > > > for understanding what bwmon hw measures at the system cache
> > > > level and at the DDR level which is helpful in debugging
> > > > bwmon behavior.
> > > > 
> > > > Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
> > > > ---
> > > >   MAINTAINERS                        |  1 +
> > > >   drivers/soc/qcom/icc-bwmon.c       |  7 +++--
> > > >   drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
> > > >   3 files changed, 55 insertions(+), 2 deletions(-)
> > > >   create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
> > > > 
> > > > diff --git a/MAINTAINERS b/MAINTAINERS
> > > > index 242fc612fbc5..1b410c0183bb 100644
> > > > --- a/MAINTAINERS
> > > > +++ b/MAINTAINERS
> > > > @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> > > >   L:    linux-arm-msm@vger.kernel.org
> > > >   S:    Maintained
> > > >   F: Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
> > > > +F:    drivers/soc/qcom/trace_icc-bwmon.h
> > > >   F:    drivers/soc/qcom/icc-bwmon.c
> > > > 
> > > >   QUALCOMM IOMMU
> > > > diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
> > > > index fb323b3364db..9b5ac1e62673 100644
> > > > --- a/drivers/soc/qcom/icc-bwmon.c
> > > > +++ b/drivers/soc/qcom/icc-bwmon.c
> > > > @@ -17,6 +17,8 @@
> > > >   #include <linux/pm_opp.h>
> > > >   #include <linux/regmap.h>
> > > >   #include <linux/sizes.h>
> > > > +#define CREATE_TRACE_POINTS
> > > > +#include "trace_icc-bwmon.h"
> > > > 
> > > >   /*
> > > >    * The BWMON samples data throughput within 'sample_ms' time. With three
> > > > @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
> > > >       struct icc_bwmon *bwmon = dev_id;
> > > >       unsigned int irq_enable = 0;
> > > >       struct dev_pm_opp *opp, *target_opp;
> > > > -    unsigned int bw_kbps, up_kbps, down_kbps;
> > > > +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
> > > > 
> > > > -    bw_kbps = bwmon->target_kbps;
> > > > +    meas_kbps = bw_kbps = bwmon->target_kbps;
> > > > 
> > > >       target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
> > > 
> > > This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
> > > (uninitialized variable) value
> > > 
> > 
> > Thank you for reviewing the patch.
> > I didn't get it, still the variable "bw_kbps" is being initialized along with "meas_kbps". Which variable are you referring to as being fed to dev_pm_opp_find_bw_ceil  with an uninitialized value?
> 
> Oh this one's on me, I skipped over the middle assignment.. Sorry!

Still:

CHECK: multiple assignments should be avoided
#57: FILE: drivers/soc/qcom/icc-bwmon.c:652:
+	meas_kbps = bw_kbps = bwmon->target_kbps;

While we are at it:

CHECK: Alignment should match open parenthesis
#88: FILE: drivers/soc/qcom/trace_icc-bwmon.h:14:
+TRACE_EVENT(qcom_bwmon_update,
+

CHECK: Alignment should match open parenthesis
#109: FILE: drivers/soc/qcom/trace_icc-bwmon.h:35:
+	TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
+		__get_str(name),


-- 
With best wishes
Dmitry

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread
  2024-06-20 20:36       ` Dmitry Baryshkov
@ 2024-06-24 11:11         ` Shivnandan Kumar
  0 siblings, 0 replies; 9+ messages in thread
From: Shivnandan Kumar @ 2024-06-24 11:11 UTC (permalink / raw)
  To: Dmitry Baryshkov, Konrad Dybcio
  Cc: Krzysztof Kozlowski, Bjorn Andersson, linux-kernel, linux-arm-msm,
	quic_rgottimu



On 6/21/2024 2:06 AM, Dmitry Baryshkov wrote:
> On Thu, Jun 20, 2024 at 12:48:04PM GMT, Konrad Dybcio wrote:
>>
>>
>> On 6/20/24 10:55, Shivnandan Kumar wrote:
>>>
>>>
>>> On 6/20/2024 12:46 AM, Konrad Dybcio wrote:
>>>>
>>>>
>>>> On 6/19/24 15:51, Shivnandan Kumar wrote:
>>>>> Add tracepoint for tracing the measured traffic in kbps,
>>>>> up_kbps and down_kbps in bwmon. This information is valuable
>>>>> for understanding what bwmon hw measures at the system cache
>>>>> level and at the DDR level which is helpful in debugging
>>>>> bwmon behavior.
>>>>>
>>>>> Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>
>>>>> ---
>>>>>    MAINTAINERS                        |  1 +
>>>>>    drivers/soc/qcom/icc-bwmon.c       |  7 +++--
>>>>>    drivers/soc/qcom/trace_icc-bwmon.h | 49 ++++++++++++++++++++++++++++++
>>>>>    3 files changed, 55 insertions(+), 2 deletions(-)
>>>>>    create mode 100644 drivers/soc/qcom/trace_icc-bwmon.h
>>>>>
>>>>> diff --git a/MAINTAINERS b/MAINTAINERS
>>>>> index 242fc612fbc5..1b410c0183bb 100644
>>>>> --- a/MAINTAINERS
>>>>> +++ b/MAINTAINERS
>>>>> @@ -18573,6 +18573,7 @@ M:    Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>>>>>    L:    linux-arm-msm@vger.kernel.org
>>>>>    S:    Maintained
>>>>>    F: Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml
>>>>> +F:    drivers/soc/qcom/trace_icc-bwmon.h
>>>>>    F:    drivers/soc/qcom/icc-bwmon.c
>>>>>
>>>>>    QUALCOMM IOMMU
>>>>> diff --git a/drivers/soc/qcom/icc-bwmon.c b/drivers/soc/qcom/icc-bwmon.c
>>>>> index fb323b3364db..9b5ac1e62673 100644
>>>>> --- a/drivers/soc/qcom/icc-bwmon.c
>>>>> +++ b/drivers/soc/qcom/icc-bwmon.c
>>>>> @@ -17,6 +17,8 @@
>>>>>    #include <linux/pm_opp.h>
>>>>>    #include <linux/regmap.h>
>>>>>    #include <linux/sizes.h>
>>>>> +#define CREATE_TRACE_POINTS
>>>>> +#include "trace_icc-bwmon.h"
>>>>>
>>>>>    /*
>>>>>     * The BWMON samples data throughput within 'sample_ms' time. With three
>>>>> @@ -645,9 +647,9 @@ static irqreturn_t bwmon_intr_thread(int irq, void *dev_id)
>>>>>        struct icc_bwmon *bwmon = dev_id;
>>>>>        unsigned int irq_enable = 0;
>>>>>        struct dev_pm_opp *opp, *target_opp;
>>>>> -    unsigned int bw_kbps, up_kbps, down_kbps;
>>>>> +    unsigned int bw_kbps, up_kbps, down_kbps, meas_kbps;
>>>>>
>>>>> -    bw_kbps = bwmon->target_kbps;
>>>>> +    meas_kbps = bw_kbps = bwmon->target_kbps;
>>>>>
>>>>>        target_opp = dev_pm_opp_find_bw_ceil(bwmon->dev, &bw_kbps, 0);
>>>>
>>>> This breaks bwmon, as dev_pm_opp_find_bw_ceil is now fed a random
>>>> (uninitialized variable) value
>>>>
>>>
>>> Thank you for reviewing the patch.
>>> I didn't get it, still the variable "bw_kbps" is being initialized along with "meas_kbps". Which variable are you referring to as being fed to dev_pm_opp_find_bw_ceil  with an uninitialized value?
>>
>> Oh this one's on me, I skipped over the middle assignment.. Sorry!
> 
> Still:
> 
> CHECK: multiple assignments should be avoided

ack

> #57: FILE: drivers/soc/qcom/icc-bwmon.c:652:
> +	meas_kbps = bw_kbps = bwmon->target_kbps;
> 
> While we are at it:
> 
> CHECK: Alignment should match open parenthesis
> #88: FILE: drivers/soc/qcom/trace_icc-bwmon.h:14:
> +TRACE_EVENT(qcom_bwmon_update,
> +

ack

> 
> CHECK: Alignment should match open parenthesis
> #109: FILE: drivers/soc/qcom/trace_icc-bwmon.h:35:
> +	TP_printk("name=%s meas_kbps=%u up_kbps=%u down_kbps=%u",
> +		__get_str(name),
> 
> 

Thanks,
Shivnandan

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-06-24 11:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-31 10:54 [PATCH] soc: qcom: icc-bwmon: Add tracepoints in bwmon_intr_thread Shivnandan Kumar
2024-05-31 20:29 ` kernel test robot
2024-06-01  1:28 ` kernel test robot
  -- strict thread matches above, loose matches on Subject: below --
2024-06-19 13:51 Shivnandan Kumar
2024-06-19 19:16 ` Konrad Dybcio
2024-06-20  8:55   ` Shivnandan Kumar
2024-06-20 10:48     ` Konrad Dybcio
2024-06-20 20:36       ` Dmitry Baryshkov
2024-06-24 11:11         ` Shivnandan Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox