The initialisation code checks TRCIDR4 to determine the number of resource
selectors available on the system. Since ETM v 4.3, the value 0 has a
different meaning. This patch takes into account this change.
Signed-off-by: Mike Leach <mike.leach(a)linaro.org>
---
drivers/hwtracing/coresight/coresight-etm4x.c | 8 +++++++-
drivers/hwtracing/coresight/coresight-etm4x.h | 3 +++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index 00c9f0bb8b1a..be687276704c 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -742,8 +742,14 @@ static void etm4_init_arch_data(void *info)
* The number of resource pairs conveyed by the HW starts at 0, i.e a
* value of 0x0 indicate 1 resource pair, 0x1 indicate two and so on.
* As such add 1 to the value of NUMRSPAIR for a better representation.
+ *
+ * For ETM v4.3 and later, 0x0 means 0, and no pairs are available -
+ * the default TRUE and FALSE resource selectors are omitted.
+ * Otherwise for values 0x1 and above the number is N + 1 as per v4.2.
*/
- drvdata->nr_resource = BMVAL(etmidr4, 16, 19) + 1;
+ drvdata->nr_resource = BMVAL(etmidr4, 16, 19);
+ if ((drvdata->arch < ETM4X_ARCH_4V3) || (drvdata->nr_resource > 0))
+ drvdata->nr_resource += 1;
/*
* NUMSSCC, bits[23:20] the number of single-shot
* comparator control for tracing. Read any status regs as these
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h
index 5259f96fd28a..eefc7371c6c4 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.h
+++ b/drivers/hwtracing/coresight/coresight-etm4x.h
@@ -200,6 +200,9 @@
/* NS MON (EL3) mode never implemented */
#define ETM_EXLEVEL_NS_VICTLR_MASK GENMASK(22, 20)
+/* Interpretation of resource numbers change at ETM v4.3 architecture */
+#define ETM4X_ARCH_4V3 0x43
+
/**
* struct etmv4_config - configuration information related to an ETMv4
* @mode: Controls various modes supported by this ETM.
--
2.17.1
Hi,
I.m adding in the Coresight mailing list in case anyone else has further
information.
I am unaware of any current implementation available that has speculative
trace.
The speculative trace support has been tested within ARM as part of
internal architecture validation that is not available publicly.
Regards
Mike
On Fri, 11 Sep 2020 at 07:36, Albert Schulz <notifications(a)github.com>
wrote:
> ETMv4 supports giving speculative information for program flow, but most
> implementation does not seem to support that, nor any traces containing
> these are existent in this repository. Do you know about implementations /
> architectures supporting that so we could enrich the testsuites?
>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/Linaro/OpenCSD/issues/27>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ADF7BMYMQCLYALIFQLLHYDTSF…>
> .
>
--
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK
Ftrace has ability to export trace packets to other destination.
Currently, only function trace can be exported. This series extends the
support to event trace and trace_maker. STM is one possible destination to
export ftrace. Use separate channel for each CPU to avoid mixing up packets
from different CPUs together.
Change from v2:
Change flag definition to BIT(). (Steven)
Add comment in stm_ftrace_write() to clarify it's safe to use
smp_processor_id() here since preempt is disabled. (Steven)
Change from v1:
All changes 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
tracing: add flag to control different traces
tracing: add trace_export support for event trace
tracing: add trace_export support for trace_marker
stm class: ftrace: enable supported trace export flag
stm class: ftrace: use different channel accroding to CPU
drivers/hwtracing/stm/Kconfig | 2 +-
drivers/hwtracing/stm/ftrace.c | 7 +-
include/linux/trace.h | 7 +
kernel/trace/trace.c | 270 ++++++++++++++++++---------------
4 files changed, 159 insertions(+), 127 deletions(-)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Allow to build coresight as modules. This gives developers the feasibility to
test their code without reboot.
This series is based on below two series.
- "coresight: allow to build components as modules"
https://lkml.org/lkml/2018/6/5/989
- "coresight: make drivers modular"
https://lkml.org/lkml/2020/1/17/468
Change from v9:
Fix warning reported by kernel test robot <lkp(a)intel.com>
Rebase to coresight-next
Change from v8:
Protect etmdrvdata[] by modifying it on relevant CPU (Mathieu and Suzuki)
Grab the device before allocating memory for the node (Mathieu)
Add author of coresight core driver (Mathieu)
Change from v7:
Depends on below change for ETM hotplug (Sai)
https://lore.kernel.org/linux-arm-kernel/20200729051310.18436-1-saiprakash.…
Add mutex lock to protect etmdrvdata[] (Suzuki)
Add helper function coresight_get_ref() (Suzuki)
Reorg replicator and funnel change. Use two patches to support these
two drivers. (Suzuki)
Add fix tag to "coresight: etm: perf: Fix warning caused by etm_setup_aux
failure" (Suzuki)
Update author of "coresight: cti: Fix bug clearing sysfs links on callback"
Change from v6:
Correct module description for CATU (Mike)
Check ect_ret equals 0 and set ect_enabled flag (Mike)
Add Tested-by and Reviewed-by from Mike
Change from v5:
Add below CTI clean up change from Mike into series
-https://lists.linaro.org/pipermail/coresight/2020-July/004349.html
Increase module reference count when enabling CTI device (Mike)
Change from v4:
Fix error handling in coresight_grab_devicei() (Greg)
Add coresight: cti: Fix remove sysfs link error from Mike
-https://lists.linaro.org/pipermail/coresight/2020-July/004275.html
Move cti_remove_conn_xrefs() into cti_remove() (Mike)
Align patch subject to coresight: <component>: <description> (Mike)
Change from v3:
Rebase to coresight-next (Mike and Mathieu)
Reorder try_get_module() (Suzuki)
Clean up etmdrvdata[] in device remote path (Mike)
Move cti_remove_conn_xrefs to cti_remove (Mike)
Change from v2:
Rebase to 5.8-rc5. Export coresight_add_sysfs_link and
coresight_remove_sysfs_link
Fix one cut and paste error on MODULE_DESCRIPTION of CTI
Change from v1:
Use try_module_get() to avoid module to be unloaded when device is used
in active trace session. (Mathieu P)
Change from above two series.
This series adds the support to dynamically remove module when the device in
that module is enabled and used by some trace path. It disables all trace
paths with that device and release the trace path.
Kim Phillips (8):
coresight: use IS_ENABLED for CONFIGs that may be modules
coresight: etm3x: allow etm3x to be built as a module
coresight: etm4x: allow etm4x to be built as a module
coresight: etb: allow etb to be built as a module
coresight: tpiu: allow tpiu to be built as a module
coresight: tmc: allow tmc to be built as a module
coresight: allow funnel driver to be built as module
coresight: allow replicator driver to be built as module
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 module name in Kconfig
coresight: cpu_debug: define MODULE_DEVICE_TABLE
coresight: add coresight prefix to barrier_pkt
coresight: add try_get_module() in coresight_grab_device()
coresight: stm: allow to build coresight-stm as a module
coresight: etm: perf: Fix warning caused by etm_setup_aux failure
coresight: cti: add function to register cti associate ops
coresight: cti: don't disable ect device if it's not enabled
coresight: cti: increase reference count when enabling cti
coresight: cti: allow cti to be built as a module
coresight: catu: allow catu drivers to be built as modules
coresight: allow the coresight core driver to be built as a module
drivers/hwtracing/coresight/Kconfig | 54 ++++--
drivers/hwtracing/coresight/Makefile | 22 +--
drivers/hwtracing/coresight/coresight-catu.c | 37 ++++-
drivers/hwtracing/coresight/coresight-catu.h | 2 -
.../{coresight.c => coresight-core.c} | 154 +++++++++++++++---
.../hwtracing/coresight/coresight-cpu-debug.c | 2 +
.../{coresight-cti.c => coresight-cti-core.c} | 67 ++++++--
drivers/hwtracing/coresight/coresight-etb10.c | 28 +++-
.../hwtracing/coresight/coresight-etm-perf.c | 13 +-
.../hwtracing/coresight/coresight-etm-perf.h | 5 +-
...resight-etm3x.c => coresight-etm3x-core.c} | 28 +++-
...resight-etm4x.c => coresight-etm4x-core.c} | 84 +++++++---
.../hwtracing/coresight/coresight-funnel.c | 64 +++++++-
.../hwtracing/coresight/coresight-platform.c | 1 +
drivers/hwtracing/coresight/coresight-priv.h | 24 ++-
.../coresight/coresight-replicator.c | 65 +++++++-
drivers/hwtracing/coresight/coresight-stm.c | 20 ++-
drivers/hwtracing/coresight/coresight-sysfs.c | 2 +
.../{coresight-tmc.c => coresight-tmc-core.c} | 25 ++-
.../hwtracing/coresight/coresight-tmc-etf.c | 2 +-
.../hwtracing/coresight/coresight-tmc-etr.c | 21 ++-
drivers/hwtracing/coresight/coresight-tmc.h | 3 +
drivers/hwtracing/coresight/coresight-tpiu.c | 20 ++-
include/linux/coresight.h | 3 +-
24 files changed, 636 insertions(+), 110 deletions(-)
rename drivers/hwtracing/coresight/{coresight.c => coresight-core.c} (92%)
rename drivers/hwtracing/coresight/{coresight-cti.c => coresight-cti-core.c} (94%)
rename drivers/hwtracing/coresight/{coresight-etm3x.c => coresight-etm3x-core.c} (97%)
rename drivers/hwtracing/coresight/{coresight-etm4x.c => coresight-etm4x-core.c} (96%)
rename drivers/hwtracing/coresight/{coresight-tmc.c => coresight-tmc-core.c} (95%)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Hi,
I just wanted to check if you would be interested in acquiring a contact
list of Managed Service providers (MSPs) and Managed Security Service
Providers (MSSPs) for your Marketing and Demand Generation program.
*You might also be interested in other categories like*:
· CSPs, ISPs, ISVs, VARS, SIs
· Cyber Security Customers of Top Companies
· Storage customers of Top Companies
· Virtualization customers of Top Companies
· Networking customers of Top Companies
· Contact Center customers of Top Companies
· CRM, ERP and HCM customers of Top Companies
· Microsoft, Salesforce, AWS, Oracle, SAP, Cisco, IBM etc. Customers
*Each contact comes with* Company name, Website, Contact name (First,
Middle, Last), Title, Direct email address, Phone, Postal address,
Industry, SIC codes, Employee size, Revenue size.
Please let me know if this is something of interest to you so that I can
provide you with further information.
Warm regards,
Erin Mooney| Go-To-Market Coordinator
If you wish to not to receive further emails, change the subject line to
Unsubscribe
On Thu, Sep 10, 2020 at 04:45:52AM +0800, tsoni(a)codeaurora.org wrote:
> On 2020-09-09 09:15, Mathieu Poirier wrote:
> >On Wed, Sep 09, 2020 at 02:54:33AM +0000, Tingwei Zhang wrote:
> >>On Wed, Sep 09, 2020 at 01:53:51AM +0800, Mathieu Poirier wrote:
> >>> Hi Tingwei,
> >>>
> >>> Apologies for the untimely response to this set, I am hoping to get
> to
> >>> it in the next two weeks.
> >>>
> >>
> >>It's fine, Mathieu. Please let me know your comments once you have time.
> >>I'm targeting to get these set merged in 5.10 Kernel.
> >
> >From the above it is not clear if you want this set to be _in_ the 5.10
> >cycle
> >or added to my list _during_ the 5.10 cycle, which would make it part of
> >the
> >5.11 cycle. In any case the latter seems more realistic.
>
> Tingwei can correct me here, but we prefer to have patches to be part of the
> 5.10 release. It means they should get merged in Linus's tree in the next
> merge window.
Yes. The target is to merge this series into Linus's tree in 5.10 Kernel.
Thanks,
Tingwei
>
> ---Trilok Soni
On Wed, Sep 09, 2020 at 02:54:33AM +0000, Tingwei Zhang wrote:
> On Wed, Sep 09, 2020 at 01:53:51AM +0800, Mathieu Poirier wrote:
> > Hi Tingwei,
> >
> > Apologies for the untimely response to this set, I am hoping to get to
> > it in the next two weeks.
> >
>
> It's fine, Mathieu. Please let me know your comments once you have time.
> I'm targeting to get these set merged in 5.10 Kernel.
>From the above it is not clear if you want this set to be _in_ the 5.10 cycle
or added to my list _during_ the 5.10 cycle, which would make it part of the
5.11 cycle. In any case the latter seems more realistic.
>
> > Thanks,
> > Mathieu
> >
> > On Wed, 19 Aug 2020 at 23:47, Tingwei Zhang <tingwei(a)codeaurora.org>
> > wrote:
> > >
> > > Allow to build coresight as modules. This gives developers the
> > feasibility to
> > > test their code without reboot.
> > >
> > > This series is based on below two series.
> > >
> > > - "coresight: allow to build components as modules"
> > > https://lkml.org/lkml/2018/6/5/989
> > > - "coresight: make drivers modular"
> > > https://lkml.org/lkml/2020/1/17/468
> > >
> > > Change from v8:
> > > Protect etmdrvdata[] by modifying it on relevant CPU (Mathieu and
> > Suzuki)
> > > Grab the device before allocating memory for the node (Mathieu)
> > > Add author of coresight core driver (Mathieu)
> > >
> > > Change from v7:
> > > Depends on below change for ETM hotplug (Sai)
> > >
> > https://lore.kernel.org/linux-arm-kernel/20200729051310.18436-1-saiprakash
> > .ranjan(a)codeaurora.org/
> > > Add mutex lock to protect etmdrvdata[] (Suzuki)
> > > Add helper function coresight_get_ref() (Suzuki)
> > > Reorg replicator and funnel change. Use two patches to support these
> > > two drivers. (Suzuki)
> > > Add fix tag to "coresight: etm: perf: Fix warning caused by
> > etm_setup_aux
> > > failure" (Suzuki)
> > > Update author of "coresight: cti: Fix bug clearing sysfs links on
> > callback"
> > >
> > > Change from v6:
> > > Correct module description for CATU (Mike)
> > > Check ect_ret equals 0 and set ect_enabled flag (Mike)
> > > Add Tested-by and Reviewed-by from Mike
> > >
> > > Change from v5:
> > > Add below CTI clean up change from Mike into series
> > > -https://lists.linaro.org/pipermail/coresight/2020-July/004349.html
> > > Increase module reference count when enabling CTI device (Mike)
> > >
> > > Change from v4:
> > > Fix error handling in coresight_grab_devicei() (Greg)
> > > Add coresight: cti: Fix remove sysfs link error from Mike
> > > -https://lists.linaro.org/pipermail/coresight/2020-July/004275.html
> > > Move cti_remove_conn_xrefs() into cti_remove() (Mike)
> > > Align patch subject to coresight: <component>: <description> (Mike)
> > >
> > > Change from v3:
> > > Rebase to coresight-next (Mike and Mathieu)
> > > Reorder try_get_module() (Suzuki)
> > > Clean up etmdrvdata[] in device remote path (Mike)
> > > Move cti_remove_conn_xrefs to cti_remove (Mike)
> > >
> > > Change from v2:
> > > Rebase to 5.8-rc5. Export coresight_add_sysfs_link and
> > > coresight_remove_sysfs_link
> > > Fix one cut and paste error on MODULE_DESCRIPTION of CTI
> > >
> > > Change from v1:
> > > Use try_module_get() to avoid module to be unloaded when device is used
> > > in active trace session. (Mathieu P)
> > >
> > > Change from above two series.
> > > This series adds the support to dynamically remove module when the
> > device in
> > > that module is enabled and used by some trace path. It disables all
> > trace
> > > paths with that device and release the trace path.
> > >
> > > Kim Phillips (8):
> > > coresight: use IS_ENABLED for CONFIGs that may be modules
> > > coresight: etm3x: allow etm3x to be built as a module
> > > coresight: etm4x: allow etm4x to be built as a module
> > > coresight: etb: allow etb to be built as a module
> > > coresight: tpiu: allow tpiu to be built as a module
> > > coresight: tmc: allow tmc to be built as a module
> > > coresight: allow funnel driver to be built as module
> > > coresight: allow replicator driver to be built as module
> > >
> > > 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 module name in Kconfig
> > > coresight: cpu_debug: define MODULE_DEVICE_TABLE
> > > coresight: add coresight prefix to barrier_pkt
> > > coresight: add try_get_module() in coresight_grab_device()
> > > coresight: stm: allow to build coresight-stm as a module
> > > coresight: etm: perf: Fix warning caused by etm_setup_aux failure
> > > coresight: cti: add function to register cti associate ops
> > > coresight: cti: don't disable ect device if it's not enabled
> > > coresight: cti: increase reference count when enabling cti
> > > coresight: cti: allow cti to be built as a module
> > > coresight: catu: allow catu drivers to be built as modules
> > > coresight: allow the coresight core driver to be built as a module
> > >
> > > drivers/hwtracing/coresight/Kconfig | 54 ++++--
> > > drivers/hwtracing/coresight/Makefile | 22 +--
> > > drivers/hwtracing/coresight/coresight-catu.c | 37 ++++-
> > > drivers/hwtracing/coresight/coresight-catu.h | 2 -
> > > .../{coresight.c => coresight-core.c} | 154 +++++++++++++++---
> > > .../hwtracing/coresight/coresight-cpu-debug.c | 2 +
> > > .../{coresight-cti.c => coresight-cti-core.c} | 63 ++++++-
> > > drivers/hwtracing/coresight/coresight-etb10.c | 28 +++-
> > > .../hwtracing/coresight/coresight-etm-perf.c | 13 +-
> > > .../hwtracing/coresight/coresight-etm-perf.h | 5 +-
> > > ...resight-etm3x.c => coresight-etm3x-core.c} | 28 +++-
> > > ...resight-etm4x.c => coresight-etm4x-core.c} | 84 +++++++---
> > > .../hwtracing/coresight/coresight-funnel.c | 64 +++++++-
> > > .../hwtracing/coresight/coresight-platform.c | 1 +
> > > drivers/hwtracing/coresight/coresight-priv.h | 24 ++-
> > > .../coresight/coresight-replicator.c | 65 +++++++-
> > > drivers/hwtracing/coresight/coresight-stm.c | 20 ++-
> > > drivers/hwtracing/coresight/coresight-sysfs.c | 2 +
> > > .../{coresight-tmc.c => coresight-tmc-core.c} | 25 ++-
> > > .../hwtracing/coresight/coresight-tmc-etf.c | 2 +-
> > > .../hwtracing/coresight/coresight-tmc-etr.c | 21 ++-
> > > drivers/hwtracing/coresight/coresight-tmc.h | 3 +
> > > drivers/hwtracing/coresight/coresight-tpiu.c | 20 ++-
> > > include/linux/coresight.h | 3 +-
> > > 24 files changed, 634 insertions(+), 108 deletions(-)
> > > rename drivers/hwtracing/coresight/{coresight.c => coresight-core.c}
> > (92%)
> > > rename drivers/hwtracing/coresight/{coresight-cti.c =>
> > coresight-cti-core.c} (94%)
> > > rename drivers/hwtracing/coresight/{coresight-etm3x.c =>
> > coresight-etm3x-core.c} (97%)
> > > rename drivers/hwtracing/coresight/{coresight-etm4x.c =>
> > coresight-etm4x-core.c} (96%)
> > > rename drivers/hwtracing/coresight/{coresight-tmc.c =>
> > coresight-tmc-core.c} (95%)
> > >
> > > --
> > > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora
> > Forum,
> > > a Linux Foundation Collaborative Project
> > >
> >
> > _______________________________________________
> > linux-arm-kernel mailing list
> > linux-arm-kernel(a)lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel