Re: Set DBGCLAIM when self-host debug is enabled

2021-01-07 Thread Tingwei Zhang
On Wed, Jan 06, 2021 at 08:23:56PM +0800, Mark Rutland wrote: > On Wed, Jan 06, 2021 at 06:29:53PM +0800, ting...@codeaurora.org wrote: > > Hi Will and Mark, > > Hi Tingwei, > > > In recent implementation of save/restore ARM debug registers in > > EL2/EL3, we found it's necessary to know whether

Re: [PATCH v4 20/25] coresight: etm4x: Detect system instructions support

2020-11-24 Thread Tingwei Zhang
On Tue, Nov 24, 2020 at 07:38:55PM +0800, Suzuki K Poulose wrote: > On 11/24/20 12:41 AM, Tingwei Zhang wrote: > >On Mon, Nov 23, 2020 at 05:39:43PM +0800, Suzuki K Poulose wrote: > >>On 11/23/20 7:58 AM, Tingwei Zhang wrote: > >>>Hi Suzuki, > >>> >

Re: [PATCH v4 20/25] coresight: etm4x: Detect system instructions support

2020-11-23 Thread Tingwei Zhang
On Mon, Nov 23, 2020 at 05:39:43PM +0800, Suzuki K Poulose wrote: > On 11/23/20 7:58 AM, Tingwei Zhang wrote: > >Hi Suzuki, > > > >On Fri, Nov 20, 2020 at 12:45:42AM +0800, Suzuki K Poulose wrote: > >>ETM v4.4 onwards adds support for system instruction access >

Re: [PATCH v4 20/25] coresight: etm4x: Detect system instructions support

2020-11-22 Thread Tingwei Zhang
Hi Suzuki, On Fri, Nov 20, 2020 at 12:45:42AM +0800, Suzuki K Poulose wrote: > ETM v4.4 onwards adds support for system instruction access > to the ETM. Detect the support on an ETM and switch to using the > mode when available. > > Cc: Mike Leach > Reviewed-by: Mathieu Poirier >

Re: [RFC 07/11] coresight: sink: Add TRBE driver

2020-11-13 Thread Tingwei Zhang
Hi Anshuman, On Tue, Nov 10, 2020 at 08:45:05PM +0800, Anshuman Khandual wrote: > Trace Buffer Extension (TRBE) implements a trace buffer per CPU which is > accessible via the system registers. The TRBE supports different addressing > modes including CPU virtual address and buffer modes including

Re: [RFC 06/11] coresight: ete: Detect ETE as one of the supported ETMs

2020-11-13 Thread Tingwei Zhang
Hi Anshuman, On Tue, Nov 10, 2020 at 08:45:04PM +0800, Anshuman Khandual wrote: > From: Suzuki K Poulose > > Add ETE as one of the supported device types we support > with ETM4x driver. The devices are named following the > existing convention as ete. > > ETE mandates that the trace resource

Re: [RFC 00/11] arm64: coresight: Enable ETE and TRBE

2020-11-13 Thread Tingwei Zhang
Hi Anshuman, On Tue, Nov 10, 2020 at 08:44:58PM +0800, Anshuman Khandual wrote: > This series enables future IP trace features Embedded Trace Extension (ETE) > and Trace Buffer Extension (TRBE). This series depends on the ETM system > register instruction support series [0] and the v8.4 Self

[PATCH v4 3/6] tracing: add trace_export support for event trace

2020-09-25 Thread Tingwei Zhang
Only function traces can be exported to other destinations currently. This patch exports event trace as well. Move trace export related function to the beginning of file so other trace can call trace_process_export() to export. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware

[PATCH v4 1/6] stm class: ftrace: change dependency to TRACING

2020-09-25 Thread Tingwei Zhang
We will support copying event trace to STM. Change STM_SOURCE_FTRACE to depend on TRACING since we will support multiple tracers. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin --- drivers/hwtracing/stm/Kconfig | 2 +- 1 file changed, 1

[PATCH v4 5/6] stm class: ftrace: enable supported trace export flag

2020-09-25 Thread Tingwei Zhang
Set flags for trace_export. Export function trace, event trace and trace marker to stm. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin --- drivers/hwtracing/stm/ftrace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwtracing

[PATCH v4 6/6] stm class: ftrace: use different channel accroding to CPU

2020-09-25 Thread Tingwei Zhang
To avoid mixup of packets from differnt ftrace packets simultaneously, use different channel for packets from different CPU. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) --- drivers/hwtracing/stm/ftrace.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v4 0/6] tracing: export event trace and trace_marker

2020-09-25 Thread Tingwei Zhang
are suggested by Steven Rostedt. User separate flag to control function trace, event trace and trace mark. Allocate channels according to num_possible_cpu() dynamically. Move ftrace_exports routines up so all ftrace can use them. Tingwei Zhang (6): stm class: ftrace: change dependency to TRACING

[PATCH v4 2/6] tracing: add flag to control different traces

2020-09-25 Thread Tingwei Zhang
More traces like event trace or trace marker will be supported. Add flag for difference traces, so that they can be controlled separately. Move current function trace to it's own flag instead of global ftrace enable flag. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware

[PATCH v4 4/6] tracing: add trace_export support for trace_marker

2020-09-25 Thread Tingwei Zhang
Add the support to route trace_marker buffer to other destination via trace_export. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) Reviewed-by: Alexander Shishkin --- include/linux/trace.h | 1 + kernel/trace/trace.c | 9 + 2 files changed, 10 insertions(+) diff

Re: [PATCH v3 6/6] stm class: ftrace: use different channel accroding to CPU

2020-09-22 Thread Tingwei Zhang
On Fri, Sep 18, 2020 at 08:45:52PM +0800, Alexander Shishkin wrote: > Tingwei Zhang writes: > > > @@ -63,6 +65,7 @@ static int __init stm_ftrace_init(void) > > { > > int ret; > > > > + stm_ftrace.data.nr_chans = num_possible_cpus(); > >

Re: [PATCH v11 09/24] coresight: etm3x: allow etm3x to be built as a module

2020-09-22 Thread Tingwei Zhang
On Wed, Sep 23, 2020 at 05:42:08AM +0800, Mathieu Poirier wrote: > On Tue, Sep 15, 2020 at 12:09:18PM -0600, Mathieu Poirier wrote: > > On Tue, Sep 15, 2020 at 06:41:01PM +0800, Tingwei Zhang wrote: > > > From: Kim Phillips > > > > > > Allow to build c

[PATCH v11 10/24] coresight: etm4x: allow etm4x to be built as a module

2020-09-15 Thread Tingwei Zhang
Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Suggested-by: Suzuki K Poulose Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/Kconfig | 5 +- drivers/hwtracing/coresight/Makefile | 4 +- ...resight-etm4x.c => coresight-etm4x-core.c} |

[PATCH v11 12/24] coresight: tpiu: allow tpiu to be built as a module

2020-09-15 Thread Tingwei Zhang
: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 5 - drivers/hwtracing

[PATCH v11 17/24] coresight: cti: Fix remove sysfs link error

2020-09-15 Thread Tingwei Zhang
. This patch corrects the link removal code. Fixes: 73274abb6557 ("coresight: cti: Add in sysfs links to other coresight devices") Reported-by: Tingwei Zhang Signed-off-by: Mike Leach Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-cti.c | 9 ++--- 1 file

[PATCH v11 21/24] coresight: cti: allow cti to be built as a module

2020-09-15 Thread Tingwei Zhang
on boot - move cti_remove_conn_xrefs to cti_remove since all sysfs links have gone when system calls device_release. Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by Mike Leach --- drivers/hwtracing/coresight/Kconfig | 5 - drivers/hwtracing/coresight/Makefile

[PATCH v11 16/24] coresight: cti: add function to register cti associate ops

2020-09-15 Thread Tingwei Zhang
Add static cti_assoc_ops to coresight core driver. Let cti driver register the add_assoc and remove_assoc call back. Avoid coresight core driver to depend on cti driver. Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reported-by: kernel test robot Reviewed-by: Mathieu Poirier --- drivers

[PATCH v11 19/24] coresight: cti: don't disable ect device if it's not enabled

2020-09-15 Thread Tingwei Zhang
coresight device is enabled. Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight.c | 11 --- include/linux/coresight.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers

[PATCH v11 23/24] coresight: catu: allow catu drivers to be built as modules

2020-09-15 Thread Tingwei Zhang
Allow to build coresight-catu as modules, for ease of development. - Kconfig becomes a tristate, to allow =m - add catu_remove functions, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose

[PATCH v11 20/24] coresight: cti: increase reference count when enabling cti

2020-09-15 Thread Tingwei Zhang
-off-by: Tingwei Zhang Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index 711beb92166a

[PATCH v11 22/24] coresight: tmc-etr: add function to register catu ops

2020-09-15 Thread Tingwei Zhang
From: Mian Yousaf Kaukab Make etr_catu_buf_ops static. Instead of directly accessing it in etr_buf_ops[], add a function to let catu driver register the ops at runtime. Break circular dependency between tmc-etr and catu drivers. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang

[PATCH v11 14/24] coresight: allow funnel driver to be built as module

2020-09-15 Thread Tingwei Zhang
Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Co-developed-by: Mian Yousaf Kaukab Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reported-by: kernel test robot Tested-by: Mike Leach

[PATCH v11 24/24] coresight: allow the coresight core driver to be built as a module

2020-09-15 Thread Tingwei Zhang
calls to the core init/exit functions. - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested

[PATCH v11 08/24] coresight: etm: perf: Fix warning caused by etm_setup_aux failure

2020-09-15 Thread Tingwei Zhang
ht: perf: Refactor function free_event_data()") Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm-perf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/driv

[PATCH v11 07/24] coresight: stm: allow to build coresight-stm as a module

2020-09-15 Thread Tingwei Zhang
-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 5 - drivers/hwtracing/coresight/coresight-stm.c | 20 +++- 2 files changed, 23 insertions(+), 2

[PATCH v11 18/24] coresight: cti: Fix bug clearing sysfs links on callback

2020-09-15 Thread Tingwei Zhang
is called too late in the unload process resulting in a crash. This fixes both the issues. Fixes: 177af8285b59 ("coresight: cti: Enable CTI associated with devices") Reported-by: Tingwei Zhang Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang Acked-by: Suzuki K Poulose Reviewed-b

[PATCH v11 11/24] coresight: etb: allow etb to be built as a module

2020-09-15 Thread Tingwei Zhang
: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 5 +++- drivers/hwtracing

[PATCH v11 15/24] coresight: allow replicator driver to be built as module

2020-09-15 Thread Tingwei Zhang
for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Co-developed-by: Mian Yousaf Kaukab Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang

[PATCH v11 09/24] coresight: etm3x: allow etm3x to be built as a module

2020-09-15 Thread Tingwei Zhang
Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach --- drivers/hwtracing/coresight/Kconfig | 5 +- drivers/hwtracing/coresight/Makefile | 5 +- ...resight-etm3x.c => coresight-etm3x-core.c} | 148 ++ 3 files changed, 122 insertions(+), 36 deleti

[PATCH v11 04/24] coresight: add coresight prefix to barrier_pkt

2020-09-15 Thread Tingwei Zhang
Add coresight prefix to make it specific. It will be a export symbol. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etb10.c | 2 +- drivers/hwtracing/coresight/coresight

[PATCH v11 06/24] coresight: add try_get_module() in coresight_grab_device()

2020-09-15 Thread Tingwei Zhang
When coresight device is in an active session, driver module of that device should not be removed. Use try_get_module() in coresight_grab_device() to prevent module to be unloaded. Use get_device()/put_device() to protect device data in the middle of active session. Signed-off-by: Tingwei Zhang

[PATCH v11 13/24] coresight: tmc: allow tmc to be built as a module

2020-09-15 Thread Tingwei Zhang
a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed

[PATCH v11 05/24] coresight: export global symbols

2020-09-15 Thread Tingwei Zhang
From: Mian Yousaf Kaukab Export symbols used among coresight modules. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-etm-perf.c | 1 + drivers/hwtracing/coresight/coresight-sysfs.c

[PATCH v11 03/24] coresight: use IS_ENABLED for CONFIGs that may be modules

2020-09-15 Thread Tingwei Zhang
: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm-perf.h | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 2 +- include/linux

[PATCH v11 02/24] coresight: cpu_debug: define MODULE_DEVICE_TABLE

2020-09-15 Thread Tingwei Zhang
Define a MODULE_DEVICE_TABLE for cpu_debug so module can be auto loaded on boot. Signed-off-by: Tingwei Zhang Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH v11 01/24] coresight: cpu_debug: add module name in Kconfig

2020-09-15 Thread Tingwei Zhang
Provide name of cpu_debug module in Kconfig help section. Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hwtracing/coresight

[PATCH v11 00/24] coresight: allow to build coresight as modules

2020-09-15 Thread Tingwei Zhang
ule Mian Yousaf Kaukab (2): coresight: export global symbols coresight: tmc-etr: add function to register catu ops Mike Leach (2): coresight: cti: Fix remove sysfs link error coresight: cti: Fix bug clearing sysfs links on callback Tingwei Zhang (12): coresight: cpu_debug: add modul

Re: [PATCH v3 0/6] tracing: export event trace and trace_marker

2020-09-14 Thread Tingwei Zhang
Hi Alexander, Maxime, Aleandre, May I know your comments for this patch set? Thanks, Tingwei On Thu, Sep 03, 2020 at 08:17:00AM +0800, Tingwei Zhang wrote: > Ftrace has ability to export trace packets to other destination. > Currently, only function trace can be exported. This series e

Re: [PATCH v3 0/6] tracing: export event trace and trace_marker

2020-09-14 Thread Tingwei Zhang
On Tue, Sep 15, 2020 at 06:43:09AM +0800, Steven Rostedt wrote: > On Wed, 2 Sep 2020 07:28:39 +0800 > Tingwei Zhang wrote: > > > Hi Alexander, > > > > May I know your comments for this patch set? > > I ran your patch set against get_maintainers.pl and it

Re: [PATCH v10 09/24] coresight: etm3x: allow etm3x to be built as a module

2020-09-13 Thread Tingwei Zhang
On Sun, Sep 13, 2020 at 09:17:05PM +0800, Suzuki K Poulose wrote: > On 08/21/2020 04:44 AM, Tingwei Zhang wrote: > >From: Kim Phillips > > > >Allow to build coresight-etm3x as a module, for ease of development. > > > >- Kconfig becomes a tristate, to allow =m >

Re: [PATCH v10 14/24] coresight: allow funnel driver to be built as module

2020-09-13 Thread Tingwei Zhang
On Sun, Sep 13, 2020 at 09:24:52PM +0800, Suzuki K Poulose wrote: > On 08/21/2020 04:44 AM, Tingwei Zhang wrote: > >From: Kim Phillips > > > >Allow to build coresight-funnel as module, for ease of development. > > > >- combine static and dynamic funnel init into s

Re: [PATCH v10 21/24] coresight: cti: allow cti to be built as a module

2020-09-10 Thread Tingwei Zhang
On Fri, Sep 11, 2020 at 07:03:03AM +0800, Mathieu Poirier wrote: > On Fri, Aug 21, 2020 at 11:44:42AM +0800, Tingwei Zhang wrote: > > Allow to build coresight-cti as a module, for ease of development. > > > > - Kconfig becomes a tristate, to allow =m > > - appen

Re: [PATCH v10 08/24] coresight: etm: perf: Fix warning caused by etm_setup_aux failure

2020-09-10 Thread Tingwei Zhang
On Fri, Sep 11, 2020 at 06:28:40AM +0800, Mathieu Poirier wrote: > On Fri, Aug 21, 2020 at 11:44:29AM +0800, Tingwei Zhang wrote: > > When coresight_build_path() fails on all the cpus, etm_setup_aux > > calls etm_free_aux() to free allocated event_data. > > WARN_

Re: [PATCH v10 04/24] coresight: add coresight prefix to barrier_pkt

2020-09-10 Thread Tingwei Zhang
On Fri, Sep 11, 2020 at 06:19:18AM +0800, Mathieu Poirier wrote: > On Fri, Aug 21, 2020 at 11:44:25AM +0800, Tingwei Zhang wrote: > > Add coresight prefix to make it specific. It will be a export symbol. > > > > Signed-off-by: Mian Yousaf Kaukab > > Signed-off-by:

Re: [PATCH v9 00/24] coresight: allow to build coresight as modules

2020-09-09 Thread Tingwei Zhang
On Thu, Sep 10, 2020 at 04:45:52AM +0800, ts...@codeaurora.org wrote: > On 2020-09-09 09:15, Mathieu Poirier wrote: > >On Wed, Sep 09, 2020 at 02:54:33AM +, Tingwei Zhang wrote: > >>On Wed, Sep 09, 2020 at 01:53:51AM +0800, Mathieu Poirier wrote: > >>> Hi

Re: [PATCH v9 00/24] coresight: allow to build coresight as modules

2020-09-08 Thread Tingwei Zhang
hese set merged in 5.10 Kernel. > Thanks, > Mathieu > > On Wed, 19 Aug 2020 at 23:47, Tingwei Zhang > wrote: > > > > Allow to build coresight as modules. This gives developers the > feasibility to > > test their code without reboot. > > > > This se

[PATCH v3 0/6] tracing: export event trace and trace_marker

2020-09-02 Thread Tingwei Zhang
function trace, event trace and trace mark. Allocate channels according to num_possible_cpu() dynamically. Move ftrace_exports routines up so all ftrace can use them. Tingwei Zhang (6): stm class: ftrace: change dependency to TRACING tracing: add flag to control different traces tracing: add

[PATCH v3 6/6] stm class: ftrace: use different channel accroding to CPU

2020-09-02 Thread Tingwei Zhang
To avoid mixup of packets from differnt ftrace packets simultaneously, use different channel for packets from different CPU. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) --- drivers/hwtracing/stm/ftrace.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v3 2/6] tracing: add flag to control different traces

2020-09-02 Thread Tingwei Zhang
More traces like event trace or trace marker will be supported. Add flag for difference traces, so that they can be controlled separately. Move current function trace to it's own flag instead of global ftrace enable flag. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware

[PATCH v3 5/6] stm class: ftrace: enable supported trace export flag

2020-09-02 Thread Tingwei Zhang
Set flags for trace_export. Export function trace, event trace and trace marker to stm. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) --- drivers/hwtracing/stm/ftrace.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hwtracing/stm/ftrace.c b/drivers/hwtracing

[PATCH v3 1/6] stm class: ftrace: change dependency to TRACING

2020-09-02 Thread Tingwei Zhang
We will support copying event trace to STM. Change STM_SOURCE_FTRACE to depend on TRACING since we will support multiple tracers. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) --- drivers/hwtracing/stm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[PATCH v3 4/6] tracing: add trace_export support for trace_marker

2020-09-02 Thread Tingwei Zhang
Add the support to route trace_marker buffer to other destination via trace_export. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware) --- include/linux/trace.h | 1 + kernel/trace/trace.c | 9 + 2 files changed, 10 insertions(+) diff --git a/include/linux/trace.h b

[PATCH v3 3/6] tracing: add trace_export support for event trace

2020-09-02 Thread Tingwei Zhang
Only function traces can be exported to other destinations currently. This patch exports event trace as well. Move trace export related function to the beginning of file so other trace can call trace_process_export() to export. Signed-off-by: Tingwei Zhang Reviewed-by: Steven Rostedt (VMware

Re: [PATCH v3 0/6] tracing: export event trace and trace_marker

2020-09-01 Thread Tingwei Zhang
Hi Alexander, May I know your comments for this patch set? Thanks, Tingwei On Thu, Aug 13, 2020 at 09:45:46AM +0800, Tingwei Zhang wrote: > Ftrace has ability to export trace packets to other destination. > Currently, only function trace can be exported. This series extends the >

Re: [PATCH v3 0/6] tracing: export event trace and trace_marker

2020-09-01 Thread Tingwei Zhang
On Wed, Sep 02, 2020 at 01:05:49AM +0800, Mathieu Poirier wrote: > On Tue, Sep 01, 2020 at 02:37:40PM +0800, Tingwei Zhang wrote: > > Hi Mathieu, > > > > May I know your comments for this patch set? > > I do not maintain any of these files. > Sorry for my wron

Re: [PATCH v3 0/6] tracing: export event trace and trace_marker

2020-09-01 Thread Tingwei Zhang
Hi Mathieu, May I know your comments for this patch set? Thanks, Tingwei On Thu, Aug 13, 2020 at 09:45:46AM +0800, Tingwei Zhang wrote: > Ftrace has ability to export trace packets to other destination. > Currently, only function trace can be exported. This series extends the > support

Re: [PATCH] coresight: cti: write regsiters directly in cti_enable_hw()

2020-09-01 Thread Tingwei Zhang
On Tue, Sep 01, 2020 at 04:28:19AM +0800, Mathieu Poirier wrote: > On Fri, Aug 28, 2020 at 11:18:18AM +0800, Tingwei Zhang wrote: > > On Fri, Aug 28, 2020 at 02:12:53AM +0800, Mathieu Poirier wrote: > > > Hi Tingwei, > > > > > > On Tue, Aug 18, 2020 at 0

[PATCH v2] coresight: cti: write regsiters directly in cti_enable_hw()

2020-09-01 Thread Tingwei Zhang
wered has been checked to be true with spinlock holded. CTI is powered and can be programmed until spinlock is released. Fixes: 6a0953ce7de9 ("coresight: cti: Add CPU idle pm notifer to CTI devices") Signed-off-by: Tingwei Zhang --- drivers/hwtracing/coresight/coresight-cti.c | 24 +

Re: [PATCH] coresight: cti: write regsiters directly in cti_enable_hw()

2020-08-27 Thread Tingwei Zhang
On Fri, Aug 28, 2020 at 02:12:53AM +0800, Mathieu Poirier wrote: > Hi Tingwei, > > On Tue, Aug 18, 2020 at 07:10:57PM +0800, Tingwei Zhang wrote: > > Deadlock as below is triggered by one CPU holds drvdata->spinlock > > and calls cti_enable_hw(). Smp_call_fun

[PATCH v10 24/24] coresight: allow the coresight core driver to be built as a module

2020-08-20 Thread Tingwei Zhang
calls to the core init/exit functions. - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested

[PATCH v10 22/24] coresight: tmc-etr: add function to register catu ops

2020-08-20 Thread Tingwei Zhang
From: Mian Yousaf Kaukab Make etr_catu_buf_ops static. Instead of directly accessing it in etr_buf_ops[], add a function to let catu driver register the ops at runtime. Break circular dependency between tmc-etr and catu drivers. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang

[PATCH v10 23/24] coresight: catu: allow catu drivers to be built as modules

2020-08-20 Thread Tingwei Zhang
Allow to build coresight-catu as modules, for ease of development. - Kconfig becomes a tristate, to allow =m - add catu_remove functions, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose

[PATCH v10 19/24] coresight: cti: don't disable ect device if it's not enabled

2020-08-20 Thread Tingwei Zhang
coresight device is enabled. Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang --- drivers/hwtracing/coresight/coresight.c | 11 --- include/linux/coresight.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight.c b

[PATCH v10 21/24] coresight: cti: allow cti to be built as a module

2020-08-20 Thread Tingwei Zhang
- add a MODULE_DEVICE_TABLE for autoloading on boot Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by Mike Leach --- drivers/hwtracing/coresight/Kconfig | 5 - drivers/hwtracing/coresight/Makefile | 4 ++-- .../{coresight-cti.c => coresight-cti-core.c} |

[PATCH v10 20/24] coresight: cti: increase reference count when enabling cti

2020-08-20 Thread Tingwei Zhang
-off-by: Tingwei Zhang --- drivers/hwtracing/coresight/coresight.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index d354fd57474e..6c9f6930b8b8 100644 --- a/drivers

[PATCH v10 18/24] coresight: cti: Fix bug clearing sysfs links on callback

2020-08-20 Thread Tingwei Zhang
is called too late in the unload process resulting in a crash. This fixes both the issues. Fixes: 177af8285b59 ("coresight: cti: Enable CTI associated with devices") Reported-by: Tingwei Zhang Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang Acked-by: Suzuki K Poulose --- drivers

[PATCH v10 14/24] coresight: allow funnel driver to be built as module

2020-08-20 Thread Tingwei Zhang
Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Co-developed-by: Mian Yousaf Kaukab Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reported-by: kernel test robot Tested-by: Mike Leach

[PATCH v10 17/24] coresight: cti: Fix remove sysfs link error

2020-08-20 Thread Tingwei Zhang
. This patch corrects the link removal code. Fixes: 73274abb6557 ("coresight: cti: Add in sysfs links to other coresight devices") Reported-by: Tingwei Zhang Signed-off-by: Mike Leach Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-cti.c | 9 ++--- 1 file

[PATCH v10 15/24] coresight: allow replicator driver to be built as module

2020-08-20 Thread Tingwei Zhang
for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Co-developed-by: Mian Yousaf Kaukab Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang

[PATCH v10 13/24] coresight: tmc: allow tmc to be built as a module

2020-08-20 Thread Tingwei Zhang
a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed

[PATCH v10 16/24] coresight: cti: add function to register cti associate ops

2020-08-20 Thread Tingwei Zhang
Add static cti_assoc_ops to coresight core driver. Let cti driver register the add_assoc and remove_assoc call back. Avoid coresight core driver to depend on cti driver. Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reported-by: kernel test robot Reviewed-by: Mathieu Poirier --- drivers

[PATCH v10 08/24] coresight: etm: perf: Fix warning caused by etm_setup_aux failure

2020-08-20 Thread Tingwei Zhang
When coresight_build_path() fails on all the cpus, etm_setup_aux calls etm_free_aux() to free allocated event_data. WARN_ON(cpumask_empty(mask) will be triggered since cpu mask is empty. Check event_data->snk_config is not NULL first to avoid this warning. Signed-off-by: Tingwei Zhang Revie

[PATCH v10 12/24] coresight: tpiu: allow tpiu to be built as a module

2020-08-20 Thread Tingwei Zhang
: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 5 - drivers/hwtracing

[PATCH v10 03/24] coresight: use IS_ENABLED for CONFIGs that may be modules

2020-08-20 Thread Tingwei Zhang
: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm-perf.h | 2 +- drivers/hwtracing/coresight/coresight-priv.h | 2 +- include/linux

[PATCH v10 04/24] coresight: add coresight prefix to barrier_pkt

2020-08-20 Thread Tingwei Zhang
Add coresight prefix to make it specific. It will be a export symbol. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etb10.c | 2 +- drivers/hwtracing/coresight/coresight

[PATCH v10 05/24] coresight: export global symbols

2020-08-20 Thread Tingwei Zhang
From: Mian Yousaf Kaukab Export symbols used among coresight modules. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm-perf.c | 1 + drivers

[PATCH v10 09/24] coresight: etm3x: allow etm3x to be built as a module

2020-08-20 Thread Tingwei Zhang
a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach --- drivers/hwtracing/coresight/Kconfig

[PATCH v10 10/24] coresight: etm4x: allow etm4x to be built as a module

2020-08-20 Thread Tingwei Zhang
Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Suggested-by: Suzuki K Poulose --- drivers/hwtracing/coresight/Kconfig | 5 +- drivers/hwtracing/coresight/Makefile | 4 +- ...resight-etm4x.c => coresight-etm4x-core.c} | 84 ++- 3 files changed,

[PATCH v10 11/24] coresight: etb: allow etb to be built as a module

2020-08-20 Thread Tingwei Zhang
: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 5 +++- drivers/hwtracing

[PATCH v10 06/24] coresight: add try_get_module() in coresight_grab_device()

2020-08-20 Thread Tingwei Zhang
When coresight device is in an active session, driver module of that device should not be removed. Use try_get_module() in coresight_grab_device() to prevent module to be unloaded. Use get_device()/put_device() to protect device data in the middle of active session. Signed-off-by: Tingwei Zhang

[PATCH v10 07/24] coresight: stm: allow to build coresight-stm as a module

2020-08-20 Thread Tingwei Zhang
-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 5 - drivers/hwtracing/coresight/coresight-stm.c | 20 +++- 2 files changed, 23 insertions(+), 2

[PATCH v10 02/24] coresight: cpu_debug: define MODULE_DEVICE_TABLE

2020-08-20 Thread Tingwei Zhang
Define a MODULE_DEVICE_TABLE for cpu_debug so module can be auto loaded on boot. Signed-off-by: Tingwei Zhang Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-cpu-debug.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers

[PATCH v10 00/24] coresight: allow to build coresight as modules

2020-08-20 Thread Tingwei Zhang
n Yousaf Kaukab (2): coresight: export global symbols coresight: tmc-etr: add function to register catu ops Mike Leach (2): coresight: cti: Fix remove sysfs link error coresight: cti: Fix bug clearing sysfs links on callback Tingwei Zhang (12): coresight: cpu_debug: add module name i

[PATCH v10 01/24] coresight: cpu_debug: add module name in Kconfig

2020-08-20 Thread Tingwei Zhang
Provide name of cpu_debug module in Kconfig help section. Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hwtracing/coresight

[PATCH v9 11/24] coresight: etb: allow etb to be built as a module

2020-08-19 Thread Tingwei Zhang
: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 5 +++- drivers/hwtracing

[PATCH v9 24/24] coresight: allow the coresight core driver to be built as a module

2020-08-19 Thread Tingwei Zhang
calls to the core init/exit functions. - add a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested

[PATCH v9 23/24] coresight: catu: allow catu drivers to be built as modules

2020-08-19 Thread Tingwei Zhang
Allow to build coresight-catu as modules, for ease of development. - Kconfig becomes a tristate, to allow =m - add catu_remove functions, for module unload - add a MODULE_DEVICE_TABLE for autoloading on boot Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose

[PATCH v9 20/24] coresight: cti: increase reference count when enabling cti

2020-08-19 Thread Tingwei Zhang
-off-by: Tingwei Zhang --- drivers/hwtracing/coresight/coresight.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c index d354fd57474e..6c9f6930b8b8 100644 --- a/drivers

[PATCH v9 16/24] coresight: cti: add function to register cti associate ops

2020-08-19 Thread Tingwei Zhang
Add static cti_assoc_ops to coresight core driver. Let cti driver register the add_assoc and remove_assoc call back. Avoid coresight core driver to depend on cti driver. Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight

[PATCH v9 22/24] coresight: tmc-etr: add function to register catu ops

2020-08-19 Thread Tingwei Zhang
From: Mian Yousaf Kaukab Make etr_catu_buf_ops static. Instead of directly accessing it in etr_buf_ops[], add a function to let catu driver register the ops at runtime. Break circular dependency between tmc-etr and catu drivers. Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Tingwei Zhang

[PATCH v9 21/24] coresight: cti: allow cti to be built as a module

2020-08-19 Thread Tingwei Zhang
- add a MODULE_DEVICE_TABLE for autoloading on boot Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by Mike Leach --- drivers/hwtracing/coresight/Kconfig | 5 - drivers/hwtracing/coresight/Makefile | 4 ++-- .../{coresight-cti.c => coresight-cti-core.c} |

[PATCH v9 12/24] coresight: tpiu: allow tpiu to be built as a module

2020-08-19 Thread Tingwei Zhang
: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Reviewed-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/Kconfig | 5 - drivers/hwtracing

[PATCH v9 15/24] coresight: allow replicator driver to be built as module

2020-08-19 Thread Tingwei Zhang
for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Co-developed-by: Mian Yousaf Kaukab Signed-off-by: Mian Yousaf Kaukab Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang

[PATCH v9 19/24] coresight: cti: don't disable ect device if it's not enabled

2020-08-19 Thread Tingwei Zhang
coresight device is enabled. Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang --- drivers/hwtracing/coresight/coresight.c | 11 --- include/linux/coresight.h | 1 + 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight.c b

[PATCH v9 18/24] coresight: cti: Fix bug clearing sysfs links on callback

2020-08-19 Thread Tingwei Zhang
is called too late in the unload process resulting in a crash. This fixes both the issues. Fixes: 177af8285b59 ("coresight: cti: Enable CTI associated with devices") Reported-by: Tingwei Zhang Signed-off-by: Mike Leach Signed-off-by: Tingwei Zhang Acked-by: Suzuki K Poulose --- drivers

[PATCH v9 13/24] coresight: tmc: allow tmc to be built as a module

2020-08-19 Thread Tingwei Zhang
a MODULE_DEVICE_TABLE for autoloading on boot Cc: Mathieu Poirier Cc: Leo Yan Cc: Alexander Shishkin Cc: Randy Dunlap Cc: Suzuki K Poulose Cc: Greg Kroah-Hartman Cc: Russell King Signed-off-by: Kim Phillips Signed-off-by: Tingwei Zhang Tested-by: Mike Leach Reviewed-by: Suzuki K Poulose Reviewed

  1   2   >