From: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora•org>
To: Tingwei Zhang <tingwei@codeaurora•org>
Cc: tsoni@codeaurora•org, Kim Phillips <kim.phillips@arm•com>,
Mathieu Poirier <mathieu.poirier@linaro•org>,
Suzuki K Poulose <suzuki.poulose@arm•com>,
Alexander Shishkin <alexander.shishkin@linux•intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
coresight@lists•linaro.org, Mao Jinlong <jinlmao@codeaurora•org>,
Mian Yousaf Kaukab <ykaukab@suse•de>,
Russell King <linux@armlinux•org.uk>,
Randy Dunlap <rdunlap@infradead•org>,
Leo Yan <leo.yan@linaro•org>,
linux-arm-kernel@lists•infradead.org,
Mike Leach <mike.leach@linaro•org>
Subject: Re: [PATCH v3 08/20] coresight: allow etm4x to be built as a module
Date: Tue, 21 Jul 2020 12:33:39 +0530 [thread overview]
Message-ID: <97ed83f9b4bde5158c3b0b50252af1d8@codeaurora.org> (raw)
In-Reply-To: <70d9c3f4dfac478f2128e2c25beaecd7@codeaurora.org>
Hi Tingwei,
On 2020-07-20 12:28, Sai Prakash Ranjan wrote:
> Hi Tingwei,
>
> On 2020-07-17 11:15, Tingwei Zhang wrote:
>> From: Kim Phillips <kim.phillips@arm•com>
>>
>> Allow to build coresight-etm4x as a module, for ease of development.
>>
>> - Kconfig becomes a tristate, to allow =m
>> - append -core to source file name to allow module to
>> be called coresight-etm4x by the Makefile
>> - add an etm4_remove function, for module unload
>> - add a MODULE_DEVICE_TABLE for autoloading on boot
>>
>> Cc: Mathieu Poirier <mathieu.poirier@linaro•org>
>> Cc: Leo Yan <leo.yan@linaro•org>
>> Cc: Alexander Shishkin <alexander.shishkin@linux•intel.com>
>> Cc: Randy Dunlap <rdunlap@infradead•org>
>> Cc: Suzuki K Poulose <Suzuki.Poulose@arm•com>
>> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
>> Cc: Russell King <linux@armlinux•org.uk>
>> Signed-off-by: Kim Phillips <kim.phillips@arm•com>
>> Signed-off-by: Tingwei Zhang <tingwei@codeaurora•org>
>> ---
>> drivers/hwtracing/coresight/Kconfig | 5 ++-
>> drivers/hwtracing/coresight/Makefile | 4 +--
>> ...resight-etm4x.c => coresight-etm4x-core.c} | 31
>> ++++++++++++++++++-
>> 3 files changed, 36 insertions(+), 4 deletions(-)
>> rename drivers/hwtracing/coresight/{coresight-etm4x.c =>
>> coresight-etm4x-core.c} (98%)
>>
>
> <snip>...
>
> Thanks for adding this support. etm4_cpu_pm_unregister() is dropped
> now with change to ETM PM code.
> You can base the patches on coresight-next -
> https://git.linaro.org/kernel/coresight.git/log/?h=next
>
> Also I am trying this series on SDM845 MTP (5.8.0-rc5) with Debian
> distribution,
> I see below warning when trying to disable ETM, logs below:
>
> root@linaro-developer:~# lsmod
> Module Size Used by
> cpufreq_powersave 16384 0
> cpufreq_conservative 16384 0
> msm 856064 1
> coresight_stm 24576 0
> crct10dif_ce 20480 1
> stm_core 28672 1 coresight_stm
> i2c_qcom_geni 24576 0
> qcom_rng 16384 0
> coresight_tmc 40960 0
> coresight_funnel 20480 0
> coresight_etm4x 61440 0
> coresight_replicator 20480 0
> camcc_sdm845 49152 0
> ath10k_snoc 53248 0
> socinfo 20480 0
> ip_tables 32768 0
> x_tables 45056 1 ip_tables
> ipv6 458752 26
> nf_defrag_ipv6 24576 1 ipv6
> root@linaro-developer:~#
> root@linaro-developer:~# echo 1 >
> /sys/bus/coresight/devices/tmc_etr0/enable_sink
> root@linaro-developer:~# echo 1 >
> /sys/bus/coresight/devices/etm0/enable_source
> root@linaro-developer:~# echo 0 >
> /sys/bus/coresight/devices/etm0/enable_source
> [ 332.855363] ------------[ cut here ]------------
> [ 332.860175] WARNING: CPU: 0 PID: 0 at
> drivers/hwtracing/coresight/coresight-core.c:227
> coresight_disclaim_device_unlocked+0x28/0x50
> [ 332.872177] Modules linked in: cpufreq_powersave
> cpufreq_conservative msm(+) coresight_stm crct10dif_ce stm_core
> i2c_qcom_geni qcom_rng coresi
> ght_tmc coresight_funnel coresight_etm4x coresight_replicator
> camcc_sdm845 ath10k_snoc socinfo ip_tables x_tables ipv6
> nf_defrag_ipv6
> [ 332.897043] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D W
> 5.8.0-rc5-next-20200716-00040-g50ad3222c13f-dirty #80
> [ 332.908330] Hardware name: Qualcomm Technologies, Inc. SDM845 MTP
> (DT)
> [ 332.914969] pstate: 80400085 (Nzcv daIf +PAN -UAO BTYPE=--)
> [ 332.920643] pc : coresight_disclaim_device_unlocked+0x28/0x50
> [ 332.926543] lr : etm4_disable_hw+0xd8/0x128 [coresight_etm4x]
> [ 332.932391] sp : ffff800010003ed0
> [ 332.935775] x29: ffff800010003ed0 x28: ffffb05e1bd13980
> [ 332.941193] x27: 0000004d7fb06ef3 x26: ffff800010004000
> [ 332.946606] x25: 0000000000000000 x24: ffffb05e1bd03cc0
> [ 332.952022] x23: 0000000000000000 x22: 0000000000000000
> [ 332.957436] x21: ffff800010c73c00 x20: ffff000175547400
> [ 332.962851] x19: ffff8000103af000 x18: 0000000000000005
> [ 332.968267] x17: 0000000000000000 x16: ffffb05e1a875f38
> [ 332.973678] x15: 0000000000000000 x14: ffffb05e1bd13980
> [ 332.979093] x13: ffff4fa361082000 x12: 000000003474591d
> [ 332.984507] x11: 0000000000000000 x10: 0000000000001000
> [ 332.989920] x9 : ffffb05e19a81800 x8 : 000001b2b5503510
> [ 332.995336] x7 : 000000b2b5503510 x6 : 000000003fd5ea33
> [ 333.000749] x5 : 00ffffffffffffff x4 : 000000000000b2be
> [ 333.006162] x3 : ffff0001725c8150 x2 : ffff8000103af168
> [ 333.011574] x1 : 0000000000000000 x0 : ffff8000103affa4
> [ 333.016993] Call trace:
> [ 333.019516] coresight_disclaim_device_unlocked+0x28/0x50
> [ 333.025035] etm4_disable_hw+0xd8/0x128 [coresight_etm4x]
> [ 333.030552] flush_smp_call_function_queue+0x154/0x250
> [ 333.035795] generic_smp_call_function_single_interrupt+0x18/0x20
> [ 333.041999] handle_IPI+0x32c/0x390
> [ 333.045569] gic_handle_irq+0x15c/0x160
> [ 333.049489] el1_irq+0xb8/0x180
> [ 333.052709] cpuidle_enter_state+0xac/0x4e8
> [ 333.056983] cpuidle_enter+0x3c/0x50
> [ 333.060646] call_cpuidle+0x40/0x70
> [ 333.064210] do_idle+0x20c/0x290
> [ 333.067516] cpu_startup_entry+0x28/0x70
> [ 333.071528] rest_init+0xdc/0xe8
> [ 333.074847] arch_call_rest_init+0x14/0x1c
> [ 333.079027] start_kernel+0x4e0/0x518
> [ 333.082764] ---[ end trace 162d5cef8c2b863b ]---
> root@linaro-developer:~#
>
I found that above warning is not due to your changes. If I add
"arm,coresight-loses-context-with-cpu" to SDM845 ETM nodes then
I don't see these warnings, so will add them since idle support
is present on sdm845.
Thanks,
Sai
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member
of Code Aurora Forum, hosted by The Linux Foundation
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-07-21 7:05 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 5:45 [PATCH v3 00/20] coresight: allow to build coresight as modules Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 01/20] coresight: cpu_debug: add module name in Kconfig Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 02/20] coresight: cpu_debug: define MODULE_DEVICE_TABLE Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 03/20] coresight: use IS_ENABLED for CONFIGs that may be modules Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 04/20] coresight: add coresight prefix to barrier_pkt Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 05/20] coresight: export global symbols Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 06/20] Allow to build coresight-stm as a module, for ease of development Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 07/20] coresight: allow etm3x to be built as a module Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 08/20] coresight: allow etm4x " Tingwei Zhang
2020-07-17 17:05 ` Mike Leach
2020-07-18 3:25 ` tingwei
2020-07-18 17:38 ` Mike Leach
2020-07-21 14:55 ` Mathieu Poirier
2020-07-21 23:22 ` tingwei
2020-07-20 6:58 ` Sai Prakash Ranjan
2020-07-21 7:03 ` Sai Prakash Ranjan [this message]
2020-07-17 5:45 ` [PATCH v3 09/20] coresight: allow etb " Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 10/20] coresight: allow tpiu " Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 11/20] coresight: allow tmc " Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 12/20] coresight: remove multiple init calls from funnel driver Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 13/20] coresight: remove multiple init calls from replicator driver Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 14/20] coresight: allow funnel and replicator drivers to be built as modules Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 15/20] coresight: cti: add function to register cti associate ops Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 16/20] coresight: allow cti to be built as a module Tingwei Zhang
2020-07-20 17:00 ` Mike Leach
2020-07-20 21:07 ` Mike Leach
2020-07-21 16:35 ` Mike Leach
2020-07-21 23:27 ` tingwei
2020-07-17 5:45 ` [PATCH v3 17/20] coresight: tmc-etr: add function to register catu ops Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 18/20] coresight: allow catu drivers to be built as modules Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 19/20] coresight: add try_get_module() in coresight_grab_device() Tingwei Zhang
2020-07-22 10:49 ` Suzuki K Poulose
2020-07-22 10:48 ` Greg KH
2020-07-22 11:26 ` Suzuki K Poulose
2020-07-23 0:18 ` tingwei
2020-07-23 0:35 ` tingwei
2020-07-22 10:51 ` Suzuki K Poulose
2020-07-23 0:19 ` tingwei
2020-07-23 19:36 ` Mathieu Poirier
2020-07-24 1:17 ` Tingwei Zhang
2020-07-17 5:45 ` [PATCH v3 20/20] coresight: allow the coresight core driver to be built as a module Tingwei Zhang
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=97ed83f9b4bde5158c3b0b50252af1d8@codeaurora.org \
--to=saiprakash.ranjan@codeaurora$(echo .)org \
--cc=alexander.shishkin@linux$(echo .)intel.com \
--cc=coresight@lists$(echo .)linaro.org \
--cc=gregkh@linuxfoundation$(echo .)org \
--cc=jinlmao@codeaurora$(echo .)org \
--cc=kim.phillips@arm$(echo .)com \
--cc=leo.yan@linaro$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=mathieu.poirier@linaro$(echo .)org \
--cc=mike.leach@linaro$(echo .)org \
--cc=rdunlap@infradead$(echo .)org \
--cc=suzuki.poulose@arm$(echo .)com \
--cc=tingwei@codeaurora$(echo .)org \
--cc=tsoni@codeaurora$(echo .)org \
--cc=ykaukab@suse$(echo .)de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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