* Re: [PATCH v4 0/2] Patches for introducing traces in remoteproc. [not found] <cover.1685486994.git.quic_gokukris@quicinc.com> @ 2023-05-31 21:35 ` Trilok Soni 2023-05-31 21:36 ` Trilok Soni [not found] ` <5c1744bc362fbc80615349f12c18c8ab5c4f0a6e.1685486994.git.quic_gokukris@quicinc.com> [not found] ` <bd949ac8225abb842630bd7f4a2d45334c58f17f.1685486994.git.quic_gokukris@quicinc.com> 2 siblings, 1 reply; 9+ messages in thread From: Trilok Soni @ 2023-05-31 21:35 UTC (permalink / raw) To: Gokul krishna Krishnakumar, linux-remoteproc Cc: Bjorn Andersson, Mathieu Poirier, linux-kernel, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera On 5/31/2023 2:28 PM, Gokul krishna Krishnakumar wrote: > V4: Add config symbol REMOTEPROC_TRACEPOINTS to enable traces > Rename rproc_qcom.h to remoteproc_tracepoints.h > Rename qcom_tracepoints.c to remoteproc_tracepoints.c > Switch to EXPORT_SYMBOL_GPL Any reasons you have not sent these patches to mailing list? > > V3: Split the Patch to 2 as per suggestion from Mukesh, fixed format > error from v2. > > V2: Moved the traces to common code from the qcom_pas driver as per > Bjorns review, fixed text as per Triloks suggestion, Updated QuiC > copyright to 2023. > > [1]: https://lore.kernel.org/all/20230224165142.17745-2-quic_gokukris@quicinc.com/ > > Gokul krishna Krishnakumar (2): > remoteproc: Introduce traces for remoteproc events > remoteproc: qcom: Add remoteproc tracing > > drivers/remoteproc/Kconfig | 5 + > drivers/remoteproc/Makefile | 1 + > drivers/remoteproc/qcom_common.c | 37 +++++ > drivers/remoteproc/qcom_q6v5.c | 9 ++ > drivers/remoteproc/remoteproc_core.c | 8 ++ > drivers/remoteproc/remoteproc_tracepoints.c | 13 ++ > include/trace/events/remoteproc_tracepoints.h | 129 ++++++++++++++++++ > 7 files changed, 202 insertions(+) > create mode 100644 drivers/remoteproc/remoteproc_tracepoints.c > create mode 100644 include/trace/events/remoteproc_tracepoints.h > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 0/2] Patches for introducing traces in remoteproc. 2023-05-31 21:35 ` [PATCH v4 0/2] Patches for introducing traces in remoteproc Trilok Soni @ 2023-05-31 21:36 ` Trilok Soni 2023-05-31 21:49 ` Gokul Krishna Krishnakumar 0 siblings, 1 reply; 9+ messages in thread From: Trilok Soni @ 2023-05-31 21:36 UTC (permalink / raw) To: Gokul krishna Krishnakumar, linux-remoteproc Cc: Bjorn Andersson, Mathieu Poirier, linux-kernel, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera On 5/31/2023 2:35 PM, Trilok Soni wrote: > On 5/31/2023 2:28 PM, Gokul krishna Krishnakumar wrote: >> V4: Add config symbol REMOTEPROC_TRACEPOINTS to enable traces >> Rename rproc_qcom.h to remoteproc_tracepoints.h >> Rename qcom_tracepoints.c to remoteproc_tracepoints.c >> Switch to EXPORT_SYMBOL_GPL > > > Any reasons you have not sent these patches to mailing list? I don't see linux-arm-msm mailing list. Are you CCing all the required lists and maintainers? ---Trilok Soni ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 0/2] Patches for introducing traces in remoteproc. 2023-05-31 21:36 ` Trilok Soni @ 2023-05-31 21:49 ` Gokul Krishna Krishnakumar 2023-05-31 21:50 ` Trilok Soni 0 siblings, 1 reply; 9+ messages in thread From: Gokul Krishna Krishnakumar @ 2023-05-31 21:49 UTC (permalink / raw) To: Trilok Soni, linux-remoteproc Cc: Bjorn Andersson, Mathieu Poirier, linux-kernel, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera On 5/31/2023 2:36 PM, Trilok Soni wrote: > On 5/31/2023 2:35 PM, Trilok Soni wrote: >> On 5/31/2023 2:28 PM, Gokul krishna Krishnakumar wrote: >>> V4: Add config symbol REMOTEPROC_TRACEPOINTS to enable traces >>> Rename rproc_qcom.h to remoteproc_tracepoints.h >>> Rename qcom_tracepoints.c to remoteproc_tracepoints.c >>> Switch to EXPORT_SYMBOL_GPL >> >> >> Any reasons you have not sent these patches to mailing list? > > I don't see linux-arm-msm mailing list. Are you CCing all the required > lists and maintainers? > > ---Trilok Soni linux-arm-msm was not in the remoteproc lists(I have included everyone required), I will include the linux-trace-kernel as well from the next patch. Thanks, Gokul ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 0/2] Patches for introducing traces in remoteproc. 2023-05-31 21:49 ` Gokul Krishna Krishnakumar @ 2023-05-31 21:50 ` Trilok Soni 0 siblings, 0 replies; 9+ messages in thread From: Trilok Soni @ 2023-05-31 21:50 UTC (permalink / raw) To: Gokul Krishna Krishnakumar, linux-remoteproc Cc: Bjorn Andersson, Mathieu Poirier, linux-kernel, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera On 5/31/2023 2:49 PM, Gokul Krishna Krishnakumar wrote: > > > On 5/31/2023 2:36 PM, Trilok Soni wrote: >> On 5/31/2023 2:35 PM, Trilok Soni wrote: >>> On 5/31/2023 2:28 PM, Gokul krishna Krishnakumar wrote: >>>> V4: Add config symbol REMOTEPROC_TRACEPOINTS to enable traces >>>> Rename rproc_qcom.h to remoteproc_tracepoints.h >>>> Rename qcom_tracepoints.c to remoteproc_tracepoints.c >>>> Switch to EXPORT_SYMBOL_GPL >>> >>> >>> Any reasons you have not sent these patches to mailing list? >> >> I don't see linux-arm-msm mailing list. Are you CCing all the required >> lists and maintainers? >> >> ---Trilok Soni > linux-arm-msm was not in the remoteproc lists(I have included everyone > required), I will include the linux-trace-kernel as well from the next > patch. Thanks. linux-arm-msm should be default if you had used Qualcomm platform to test these patches which I am sure you did :) ---Trilok Soni ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <5c1744bc362fbc80615349f12c18c8ab5c4f0a6e.1685486994.git.quic_gokukris@quicinc.com>]
* Re: [PATCH v4 1/2] remoteproc: Introduce traces for remoteproc events [not found] ` <5c1744bc362fbc80615349f12c18c8ab5c4f0a6e.1685486994.git.quic_gokukris@quicinc.com> @ 2023-05-31 21:51 ` Trilok Soni 2023-06-01 0:55 ` Gokul Krishna Krishnakumar 0 siblings, 1 reply; 9+ messages in thread From: Trilok Soni @ 2023-05-31 21:51 UTC (permalink / raw) To: Gokul krishna Krishnakumar, linux-remoteproc Cc: Bjorn Andersson, Mathieu Poirier, linux-kernel, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera On 5/31/2023 2:28 PM, Gokul krishna Krishnakumar wrote: > Adding Traces for the following remoteproc events: > rproc_subdev_event, > rproc_interrupt_event, > rproc_load_event, > rproc_start_event, > rproc_stop_event > > Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com> > --- > drivers/remoteproc/Kconfig | 5 + > drivers/remoteproc/Makefile | 1 + > drivers/remoteproc/remoteproc_tracepoints.c | 13 ++ > include/trace/events/remoteproc_tracepoints.h | 129 ++++++++++++++++++ > 4 files changed, 148 insertions(+) > create mode 100644 drivers/remoteproc/remoteproc_tracepoints.c > create mode 100644 include/trace/events/remoteproc_tracepoints.h > > diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig > index a850e9f486dd..2ef4f527f1c1 100644 > --- a/drivers/remoteproc/Kconfig > +++ b/drivers/remoteproc/Kconfig > @@ -365,6 +365,11 @@ config XLNX_R5_REMOTEPROC > > It's safe to say N if not interested in using RPU r5f cores. > > +config REMOTEPROC_TRACEPOINTS > + bool "Support for Remote Processor subsystem traces" > + help > + Say y to add traces to the remoteproc events. More information here please. What information these traces provide? How they can be useful to developers? More text will always be helpful. ---Trilok Soni ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 1/2] remoteproc: Introduce traces for remoteproc events 2023-05-31 21:51 ` [PATCH v4 1/2] remoteproc: Introduce traces for remoteproc events Trilok Soni @ 2023-06-01 0:55 ` Gokul Krishna Krishnakumar 0 siblings, 0 replies; 9+ messages in thread From: Gokul Krishna Krishnakumar @ 2023-06-01 0:55 UTC (permalink / raw) To: Trilok Soni, linux-remoteproc Cc: Bjorn Andersson, Mathieu Poirier, linux-kernel, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera On 5/31/2023 2:51 PM, Trilok Soni wrote: > On 5/31/2023 2:28 PM, Gokul krishna Krishnakumar wrote: >> Adding Traces for the following remoteproc events: >> rproc_subdev_event, >> rproc_interrupt_event, >> rproc_load_event, >> rproc_start_event, >> rproc_stop_event >> >> Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com> >> --- >> drivers/remoteproc/Kconfig | 5 + >> drivers/remoteproc/Makefile | 1 + >> drivers/remoteproc/remoteproc_tracepoints.c | 13 ++ >> include/trace/events/remoteproc_tracepoints.h | 129 ++++++++++++++++++ >> 4 files changed, 148 insertions(+) >> create mode 100644 drivers/remoteproc/remoteproc_tracepoints.c >> create mode 100644 include/trace/events/remoteproc_tracepoints.h >> >> diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig >> index a850e9f486dd..2ef4f527f1c1 100644 >> --- a/drivers/remoteproc/Kconfig >> +++ b/drivers/remoteproc/Kconfig >> @@ -365,6 +365,11 @@ config XLNX_R5_REMOTEPROC >> It's safe to say N if not interested in using RPU r5f cores. >> +config REMOTEPROC_TRACEPOINTS >> + bool "Support for Remote Processor subsystem traces" >> + help >> + Say y to add traces to the remoteproc events. > > More information here please. What information these traces provide? How > they can be useful to developers? More text will always be helpful. > Say y to add traces to remoteproc events of interest such as the start/stop/crash events in a remote-processor and also sub-device stop/start events and there errors. These traces can be useful while debugging errors with subsystem restart and draw an estimate on how long each event takes to run. > ---Trilok Soni How does this look. Thanks, Gokul ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <bd949ac8225abb842630bd7f4a2d45334c58f17f.1685486994.git.quic_gokukris@quicinc.com>]
* Re: [PATCH v4 2/2] remoteproc: qcom: Add remoteproc tracing [not found] ` <bd949ac8225abb842630bd7f4a2d45334c58f17f.1685486994.git.quic_gokukris@quicinc.com> @ 2023-06-01 14:18 ` kernel test robot 2023-06-01 14:18 ` kernel test robot 2023-06-07 15:35 ` Mathieu Poirier 2 siblings, 0 replies; 9+ messages in thread From: kernel test robot @ 2023-06-01 14:18 UTC (permalink / raw) To: Gokul krishna Krishnakumar, linux-remoteproc Cc: oe-kbuild-all, Bjorn Andersson, Mathieu Poirier, linux-kernel, Trilok Soni, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera, Gokul krishna Krishnakumar Hi Gokul, kernel test robot noticed the following build errors: [auto build test ERROR on remoteproc/rproc-next] [also build test ERROR on linus/master v6.4-rc4 next-20230601] [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/Gokul-krishna-Krishnakumar/remoteproc-Introduce-traces-for-remoteproc-events/20230601-053050 base: git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rproc-next patch link: https://lore.kernel.org/r/bd949ac8225abb842630bd7f4a2d45334c58f17f.1685486994.git.quic_gokukris%40quicinc.com patch subject: [PATCH v4 2/2] remoteproc: qcom: Add remoteproc tracing config: arm64-randconfig-r036-20230531 (https://download.01.org/0day-ci/archive/20230601/202306011703.PMV10K8E-lkp@intel.com/config) compiler: aarch64-linux-gcc (GCC) 12.3.0 reproduce (this is a W=1 build): mkdir -p ~/bin wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/8a5252420291719cda102eb8ca72295283540cd4 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Gokul-krishna-Krishnakumar/remoteproc-Introduce-traces-for-remoteproc-events/20230601-053050 git checkout 8a5252420291719cda102eb8ca72295283540cd4 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm64 olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202306011703.PMV10K8E-lkp@intel.com/ All errors (new ones prefixed by >>, old ones prefixed by <<): >> ERROR: modpost: "__tracepoint_rproc_subdev_event" [drivers/remoteproc/qcom_common.ko] undefined! >> ERROR: modpost: "__traceiter_rproc_subdev_event" [drivers/remoteproc/qcom_common.ko] undefined! >> ERROR: modpost: "__tracepoint_rproc_interrupt_event" [drivers/remoteproc/qcom_q6v5.ko] undefined! >> ERROR: modpost: "__traceiter_rproc_interrupt_event" [drivers/remoteproc/qcom_q6v5.ko] undefined! -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 2/2] remoteproc: qcom: Add remoteproc tracing [not found] ` <bd949ac8225abb842630bd7f4a2d45334c58f17f.1685486994.git.quic_gokukris@quicinc.com> 2023-06-01 14:18 ` [PATCH v4 2/2] remoteproc: qcom: Add remoteproc tracing kernel test robot @ 2023-06-01 14:18 ` kernel test robot 2023-06-07 15:35 ` Mathieu Poirier 2 siblings, 0 replies; 9+ messages in thread From: kernel test robot @ 2023-06-01 14:18 UTC (permalink / raw) To: Gokul krishna Krishnakumar, linux-remoteproc Cc: oe-kbuild-all, Bjorn Andersson, Mathieu Poirier, linux-kernel, Trilok Soni, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera, Gokul krishna Krishnakumar Hi Gokul, kernel test robot noticed the following build errors: [auto build test ERROR on remoteproc/rproc-next] [also build test ERROR on linus/master v6.4-rc4 next-20230601] [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/Gokul-krishna-Krishnakumar/remoteproc-Introduce-traces-for-remoteproc-events/20230601-053050 base: git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux.git rproc-next patch link: https://lore.kernel.org/r/bd949ac8225abb842630bd7f4a2d45334c58f17f.1685486994.git.quic_gokukris%40quicinc.com patch subject: [PATCH v4 2/2] remoteproc: qcom: Add remoteproc tracing config: csky-randconfig-r025-20230531 (https://download.01.org/0day-ci/archive/20230601/202306011819.IWZmMEEa-lkp@intel.com/config) compiler: csky-linux-gcc (GCC) 12.3.0 reproduce (this is a W=1 build): mkdir -p ~/bin wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/intel-lab-lkp/linux/commit/8a5252420291719cda102eb8ca72295283540cd4 git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Gokul-krishna-Krishnakumar/remoteproc-Introduce-traces-for-remoteproc-events/20230601-053050 git checkout 8a5252420291719cda102eb8ca72295283540cd4 # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=csky olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=csky SHELL=/bin/bash If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot <lkp@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202306011819.IWZmMEEa-lkp@intel.com/ All errors (new ones prefixed by >>): csky-linux-ld: drivers/remoteproc/remoteproc_core.o: in function `rproc_stop': >> remoteproc_core.c:(.text+0x4c6): undefined reference to `__traceiter_rproc_stop_event' >> csky-linux-ld: remoteproc_core.c:(.text+0x510): undefined reference to `__tracepoint_rproc_stop_event' >> csky-linux-ld: remoteproc_core.c:(.text+0x518): undefined reference to `__traceiter_rproc_stop_event' csky-linux-ld: drivers/remoteproc/remoteproc_core.o: in function `rproc_start': >> remoteproc_core.c:(.text.unlikely+0x230): undefined reference to `__traceiter_rproc_load_event' csky-linux-ld: drivers/remoteproc/remoteproc_core.o: in function `trace_rproc_start_event': >> remoteproc_core.c:(.text.unlikely+0x30a): undefined reference to `__traceiter_rproc_start_event' >> csky-linux-ld: remoteproc_core.c:(.text.unlikely+0x31c): undefined reference to `__tracepoint_rproc_load_event' >> csky-linux-ld: remoteproc_core.c:(.text.unlikely+0x324): undefined reference to `__traceiter_rproc_load_event' >> csky-linux-ld: remoteproc_core.c:(.text.unlikely+0x354): undefined reference to `__tracepoint_rproc_start_event' >> csky-linux-ld: remoteproc_core.c:(.text.unlikely+0x358): undefined reference to `__traceiter_rproc_start_event' -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v4 2/2] remoteproc: qcom: Add remoteproc tracing [not found] ` <bd949ac8225abb842630bd7f4a2d45334c58f17f.1685486994.git.quic_gokukris@quicinc.com> 2023-06-01 14:18 ` [PATCH v4 2/2] remoteproc: qcom: Add remoteproc tracing kernel test robot 2023-06-01 14:18 ` kernel test robot @ 2023-06-07 15:35 ` Mathieu Poirier 2 siblings, 0 replies; 9+ messages in thread From: Mathieu Poirier @ 2023-06-07 15:35 UTC (permalink / raw) To: Gokul krishna Krishnakumar Cc: linux-remoteproc, Bjorn Andersson, linux-kernel, Trilok Soni, Satya Durga Srinivasu Prabhala, Rajendra Nayak, Elliot Berman, Guru Das Srinagesh, Sibi Sankar, Melody Olvera Hi Gokul, On Wed, May 31, 2023 at 02:28:40PM -0700, Gokul krishna Krishnakumar wrote: > This change attempts to add traces for start, stop, crash > subsystem/subdevice events, these will serve as standard checkpoints in > code and could help in debugging the failures in subdevice/subsystem > prepare, start, stop and unprepare functions. This will also breakdown > the time taken for each step in remoteproc bootup/shutdown process. > > Signed-off-by: Gokul krishna Krishnakumar <quic_gokukris@quicinc.com> > --- > drivers/remoteproc/qcom_common.c | 37 ++++++++++++++++++++++++++++ > drivers/remoteproc/qcom_q6v5.c | 9 +++++++ > drivers/remoteproc/remoteproc_core.c | 8 ++++++ > 3 files changed, 54 insertions(+) > > diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c > index 020349f8979d..5bf6b8bc67c5 100644 > --- a/drivers/remoteproc/qcom_common.c > +++ b/drivers/remoteproc/qcom_common.c > @@ -18,6 +18,7 @@ > #include <linux/slab.h> > #include <linux/soc/qcom/mdt_loader.h> > #include <linux/soc/qcom/smem.h> > +#include <trace/events/remoteproc_tracepoints.h> > > #include "remoteproc_internal.h" > #include "qcom_common.h" > @@ -186,6 +187,10 @@ static int glink_subdev_start(struct rproc_subdev *subdev) > > glink->edge = qcom_glink_smem_register(glink->dev, glink->node); > > + trace_rproc_subdev_event(dev_name(glink->dev->parent), > + "glink", "start", > + PTR_ERR_OR_ZERO(glink->edge)); > + > return PTR_ERR_OR_ZERO(glink->edge); > } > > @@ -194,6 +199,11 @@ static void glink_subdev_stop(struct rproc_subdev *subdev, bool crashed) > struct qcom_rproc_glink *glink = to_glink_subdev(subdev); > > qcom_glink_smem_unregister(glink->edge); > + > + trace_rproc_subdev_event(dev_name(glink->dev->parent), > + "glink", "stop", > + PTR_ERR_OR_ZERO(glink->edge)); > + > glink->edge = NULL; > } > > @@ -201,6 +211,10 @@ static void glink_subdev_unprepare(struct rproc_subdev *subdev) > { > struct qcom_rproc_glink *glink = to_glink_subdev(subdev); > > + trace_rproc_subdev_event(dev_name(glink->dev->parent), > + "glink", "unprepare", > + PTR_ERR_OR_ZERO(glink->edge)); > + > qcom_glink_ssr_notify(glink->ssr_name); > } > > @@ -295,6 +309,10 @@ static int smd_subdev_start(struct rproc_subdev *subdev) > { > struct qcom_rproc_subdev *smd = to_smd_subdev(subdev); > > + trace_rproc_subdev_event(dev_name(smd->dev->parent), > + "smd", "start", > + PTR_ERR_OR_ZERO(smd->edge)); > + > smd->edge = qcom_smd_register_edge(smd->dev, smd->node); > > return PTR_ERR_OR_ZERO(smd->edge); > @@ -304,6 +322,10 @@ static void smd_subdev_stop(struct rproc_subdev *subdev, bool crashed) > { > struct qcom_rproc_subdev *smd = to_smd_subdev(subdev); > > + trace_rproc_subdev_event(dev_name(smd->dev->parent), > + "smd", "stop", > + PTR_ERR_OR_ZERO(smd->edge)); > + > qcom_smd_unregister_edge(smd->edge); > smd->edge = NULL; > } > @@ -420,6 +442,10 @@ static int ssr_notify_prepare(struct rproc_subdev *subdev) > .crashed = false, > }; > > + trace_rproc_subdev_event(ssr->info->name, > + "ssr", "QCOM_SSR_BEFORE_POWERUP", > + data.crashed); > + > srcu_notifier_call_chain(&ssr->info->notifier_list, > QCOM_SSR_BEFORE_POWERUP, &data); > return 0; > @@ -432,6 +458,9 @@ static int ssr_notify_start(struct rproc_subdev *subdev) > .name = ssr->info->name, > .crashed = false, > }; > + trace_rproc_subdev_event(ssr->info->name, > + "ssr", "QCOM_SSR_AFTER_POWERUP", > + data.crashed); > > srcu_notifier_call_chain(&ssr->info->notifier_list, > QCOM_SSR_AFTER_POWERUP, &data); > @@ -446,6 +475,10 @@ static void ssr_notify_stop(struct rproc_subdev *subdev, bool crashed) > .crashed = crashed, > }; > > + trace_rproc_subdev_event(ssr->info->name, > + "ssr", "QCOM_SSR_BEFORE_SHUTDOWN", > + data.crashed); > + > srcu_notifier_call_chain(&ssr->info->notifier_list, > QCOM_SSR_BEFORE_SHUTDOWN, &data); > } > @@ -458,6 +491,10 @@ static void ssr_notify_unprepare(struct rproc_subdev *subdev) > .crashed = false, > }; > > + trace_rproc_subdev_event(ssr->info->name, > + "ssr", "QCOM_SSR_AFTER_SHUTDOWN", > + data.crashed); > + > srcu_notifier_call_chain(&ssr->info->notifier_list, > QCOM_SSR_AFTER_SHUTDOWN, &data); > } > diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c > index 497acfb33f8f..cf3f322be65e 100644 > --- a/drivers/remoteproc/qcom_q6v5.c > +++ b/drivers/remoteproc/qcom_q6v5.c > @@ -15,6 +15,7 @@ > #include <linux/soc/qcom/smem.h> > #include <linux/soc/qcom/smem_state.h> > #include <linux/remoteproc.h> > +#include <trace/events/remoteproc_tracepoints.h> > #include "qcom_common.h" > #include "qcom_q6v5.h" > > @@ -113,6 +114,7 @@ static irqreturn_t q6v5_wdog_interrupt(int irq, void *data) > dev_err(q6v5->dev, "watchdog without message\n"); > > q6v5->running = false; > + trace_rproc_interrupt_event(q6v5->rproc, "q6v5_wdog", msg); > rproc_report_crash(q6v5->rproc, RPROC_WATCHDOG); > > return IRQ_HANDLED; > @@ -134,6 +136,7 @@ static irqreturn_t q6v5_fatal_interrupt(int irq, void *data) > dev_err(q6v5->dev, "fatal error without message\n"); > > q6v5->running = false; > + trace_rproc_interrupt_event(q6v5->rproc, "fatal", msg); > rproc_report_crash(q6v5->rproc, RPROC_FATAL_ERROR); > > return IRQ_HANDLED; > @@ -165,6 +168,8 @@ int qcom_q6v5_wait_for_start(struct qcom_q6v5 *q6v5, int timeout) > if (!ret) > disable_irq(q6v5->handover_irq); > > + trace_rproc_interrupt_event(q6v5->rproc, "Ready", !ret ? "-ETIMEDOUT":"done"); > + > return !ret ? -ETIMEDOUT : 0; > } > EXPORT_SYMBOL_GPL(qcom_q6v5_wait_for_start); > @@ -180,6 +185,8 @@ static irqreturn_t q6v5_handover_interrupt(int irq, void *data) > > q6v5->handover_issued = true; > > + trace_rproc_interrupt_event(q6v5->rproc, "handover", "Proxy votes removed"); > + > return IRQ_HANDLED; > } > > @@ -216,6 +223,8 @@ int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon) > > qcom_smem_state_update_bits(q6v5->state, BIT(q6v5->stop_bit), 0); > > + trace_rproc_interrupt_event(q6v5->rproc, "Stop", ret ? "done":"-EETIMEDOUT"); > + > return ret == 0 ? -ETIMEDOUT : 0; > } > EXPORT_SYMBOL_GPL(qcom_q6v5_request_stop); > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 1cd4815a6dd1..d8dc91a15477 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -38,6 +38,7 @@ > #include <linux/virtio_ring.h> > #include <asm/byteorder.h> > #include <linux/platform_device.h> > +#include <trace/events/remoteproc_tracepoints.h> > > #include "remoteproc_internal.h" > > @@ -1270,6 +1271,7 @@ static int rproc_start(struct rproc *rproc, const struct firmware *fw) > > /* load the ELF segments to memory */ > ret = rproc_load_segments(rproc, fw); > + trace_rproc_load_event(rproc, ret); I would move this trace point to function rproc_load_segments() and rename it to trace_rproc_load_segment_event(). > if (ret) { > dev_err(dev, "Failed to load program segments: %d\n", ret); > return ret; > @@ -1305,6 +1307,7 @@ static int rproc_start(struct rproc *rproc, const struct firmware *fw) > > /* Start any subdevices for the remote processor */ > ret = rproc_start_subdevices(rproc); > + Spurious change > if (ret) { > dev_err(dev, "failed to probe subdevices for %s: %d\n", > rproc->name, ret); > @@ -1729,6 +1732,8 @@ static int rproc_stop(struct rproc *rproc, bool crashed) > return ret; > } > > + trace_rproc_stop_event(rproc, crashed ? "crash stop" : "stop"); > + > rproc_unprepare_subdevices(rproc); > > rproc->state = RPROC_OFFLINE; > @@ -1939,6 +1944,8 @@ int rproc_boot(struct rproc *rproc) > dev_info(dev, "attaching to %s\n", rproc->name); > > ret = rproc_attach(rproc); > + trace_rproc_start_event(rproc, ret); Same here - please move the trace point to rproc_attach() and renamit it trace_rproc_attach_event(). > + > } else { > dev_info(dev, "powering up %s\n", rproc->name); > > @@ -1950,6 +1957,7 @@ int rproc_boot(struct rproc *rproc) > } > > ret = rproc_fw_boot(rproc, firmware_p); > + trace_rproc_start_event(rproc, ret); > Same Thanks, Mathieu > release_firmware(firmware_p); > } > -- > 2.40.1 > ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-06-07 15:35 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1685486994.git.quic_gokukris@quicinc.com>
2023-05-31 21:35 ` [PATCH v4 0/2] Patches for introducing traces in remoteproc Trilok Soni
2023-05-31 21:36 ` Trilok Soni
2023-05-31 21:49 ` Gokul Krishna Krishnakumar
2023-05-31 21:50 ` Trilok Soni
[not found] ` <5c1744bc362fbc80615349f12c18c8ab5c4f0a6e.1685486994.git.quic_gokukris@quicinc.com>
2023-05-31 21:51 ` [PATCH v4 1/2] remoteproc: Introduce traces for remoteproc events Trilok Soni
2023-06-01 0:55 ` Gokul Krishna Krishnakumar
[not found] ` <bd949ac8225abb842630bd7f4a2d45334c58f17f.1685486994.git.quic_gokukris@quicinc.com>
2023-06-01 14:18 ` [PATCH v4 2/2] remoteproc: qcom: Add remoteproc tracing kernel test robot
2023-06-01 14:18 ` kernel test robot
2023-06-07 15:35 ` Mathieu Poirier
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox