This patchset adds support for stopping trace on all enabled coresight sources upon execution of a programmed instruction address.
ETM stop event is triggered by an instruction address match on a comparator. This address match event is then used to stop the tracing across all ETM source devices with the help of external input/output signals and ECT.
The instruction address for the stop event can be programmed using sysfs interface.
The event flow diagram is like this, Address comparator --> EXT OUT --> ECT---> EXT IN --> Counter-->ViewInst
The original intention of this patch is to stop all ETM sources at the time of kernel panic without software intervention so that it can be used as one of the building block while enabling panic/kdump support in coresight drivers [1]. But there can be other use cases like stopping trace on assertions or error functions etc. as well.
I am sending this patch as an RFC so as to get an early feedback on the approach taken for implementation and other inputs if any.
Few caveats: - Testing was done only with sysfs interface using a arbitrary kernel symbol address. Perf support will be added later based on initial feedback. - CTI hook for enabling trace event connection need to be rewritten to use existing support APIs.
[1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1652258.html
Linu Cherian (2): coresight: Add support to setup Trace event signals coresight: etm4x: Add support to generate and synchronize stop event
drivers/hwtracing/coresight/coresight-core.c | 37 ++++ .../hwtracing/coresight/coresight-cti-core.c | 21 +++ drivers/hwtracing/coresight/coresight-cti.h | 3 + .../coresight/coresight-etm4x-core.c | 167 ++++++++++++++++++ .../coresight/coresight-etm4x-sysfs.c | 64 +++++++ drivers/hwtracing/coresight/coresight-etm4x.h | 16 ++ include/linux/coresight.h | 6 + 7 files changed, 314 insertions(+)
-- 2.31.1
While enabling coresight source device, make a Trace trigger event connection between ETM and CTI. The connection will be made only when the source has valid connection request.
Source device could use this CTI connection to synchronize stop events across cores.
Signed-off-by: Linu Cherian lcherian@marvell.com --- drivers/hwtracing/coresight/coresight-core.c | 41 ++++++++++++++++++- .../hwtracing/coresight/coresight-cti-core.c | 20 +++++++++ drivers/hwtracing/coresight/coresight-cti.h | 4 ++ include/linux/coresight.h | 6 +++ 4 files changed, 70 insertions(+), 1 deletion(-)
diff --git a/drivers/hwtracing/coresight/coresight-core.c b/drivers/hwtracing/coresight/coresight-core.c index 8a18c71df37a..9b9a932b982f 100644 --- a/drivers/hwtracing/coresight/coresight-core.c +++ b/drivers/hwtracing/coresight/coresight-core.c @@ -427,6 +427,38 @@ static void coresight_disable_link(struct coresight_device *csdev, csdev->enable = false; }
+/** + * coresight_config_trace_event - Enable/Disable the trace event + * input and output signals on the ECT. + * + * @csdev: The coresight source device + * + * Returns 0 on success, when a connection is made or removed or + * no connection is requested by the source device. + **/ +static int coresight_config_trace_event(struct coresight_device *csdev, + bool enable) +{ + int ret; + int trig_idx; + struct coresight_device *ect_csdev = csdev->ect_dev; + + if (source_ops(csdev)->get_trace_event_idx) { + trig_idx = source_ops(csdev)->get_trace_event_idx(csdev); + if (trig_idx < 0) + goto out; /* nothing to be done */ + if (!ect_ops(ect_csdev)->trace_event_config) + return -EINVAL; + ret = ect_ops(ect_csdev)->trace_event_config(ect_csdev, + trig_idx, enable); + if (ret) + return ret; + } + +out: + return 0; +} + static int coresight_enable_source(struct coresight_device *csdev, u32 mode) { int ret; @@ -439,11 +471,17 @@ static int coresight_enable_source(struct coresight_device *csdev, u32 mode)
if (!csdev->enable) { if (source_ops(csdev)->enable) { - ret = coresight_control_assoc_ectdev(csdev, true); + ret = coresight_config_trace_event(csdev, true); if (ret) return ret; + ret = coresight_control_assoc_ectdev(csdev, true); + if (ret) { + coresight_config_trace_event(csdev, false); + return ret; + } ret = source_ops(csdev)->enable(csdev, NULL, mode); if (ret) { + coresight_config_trace_event(csdev, false); coresight_control_assoc_ectdev(csdev, false); return ret; } @@ -469,6 +507,7 @@ static bool coresight_disable_source(struct coresight_device *csdev) if (atomic_dec_return(csdev->refcnt) == 0) { if (source_ops(csdev)->disable) source_ops(csdev)->disable(csdev, NULL); + coresight_config_trace_event(csdev, false); coresight_control_assoc_ectdev(csdev, false); csdev->enable = false; } diff --git a/drivers/hwtracing/coresight/coresight-cti-core.c b/drivers/hwtracing/coresight/coresight-cti-core.c index e2a3620cbf48..ec72d84cbde4 100644 --- a/drivers/hwtracing/coresight/coresight-cti-core.c +++ b/drivers/hwtracing/coresight/coresight-cti-core.c @@ -806,9 +806,29 @@ int cti_disable(struct coresight_device *csdev) return cti_disable_hw(drvdata); }
+static int cti_trace_event_config(struct coresight_device *csdev, int idx, bool enable) +{ + int val; + struct cti_drvdata *drvdata = csdev_to_cti_drvdata(csdev); + struct cti_config *config = &drvdata->config; + + if (enable) + val = BIT(CTI_CHAN_0); + else + val = 0x0; + + config->ctiinen[CTI_TRIGIN_TRACE_EVENT_0 + idx] = val; + config->ctiouten[CTI_TRIGOUT_TRACE_EVENT_0 + idx] = val; + config->ctigate = val; + + return 0; +} + + static const struct coresight_ops_ect cti_ops_ect = { .enable = cti_enable, .disable = cti_disable, + .trace_event_config = cti_trace_event_config, };
static const struct coresight_ops cti_ops = { diff --git a/drivers/hwtracing/coresight/coresight-cti.h b/drivers/hwtracing/coresight/coresight-cti.h index acf7b545e6b9..ab94bf2eab29 100644 --- a/drivers/hwtracing/coresight/coresight-cti.h +++ b/drivers/hwtracing/coresight/coresight-cti.h @@ -58,6 +58,10 @@ */ #define CTIINOUTEN_MAX 32
+#define CTI_TRIGIN_TRACE_EVENT_0 0x4 +#define CTI_TRIGOUT_TRACE_EVENT_0 0x4 +#define CTI_CHAN_0 0x0 + /** * Group of related trigger signals * diff --git a/include/linux/coresight.h b/include/linux/coresight.h index 93a2922b7653..17ab5f2bfe4c 100644 --- a/include/linux/coresight.h +++ b/include/linux/coresight.h @@ -323,6 +323,7 @@ struct coresight_ops_link { * to the HW. * @enable: enables tracing for a source. * @disable: disables tracing for a source. + * @get_trace_event_idx: returns the value of trace event index to be enabled */ struct coresight_ops_source { int (*cpu_id)(struct coresight_device *csdev); @@ -331,6 +332,7 @@ struct coresight_ops_source { struct perf_event *event, u32 mode); void (*disable)(struct coresight_device *csdev, struct perf_event *event); + int (*get_trace_event_idx)(struct coresight_device *csdev); };
/** @@ -352,10 +354,14 @@ struct coresight_ops_helper { * * @enable : Enable the device * @disable : Disable the device + * @trace_event_config: Enable/Disable Trace Event In/Out index + * */ struct coresight_ops_ect { int (*enable)(struct coresight_device *csdev); int (*disable)(struct coresight_device *csdev); + int (*trace_event_config)(struct coresight_device *csdev, + int idx, bool enable); };
struct coresight_ops {
A stop event is triggered by an instruction address match on a comparator. This address match event is then used to stop the tracing across all ETM source devices with the help of external input/output signals and ECT.
The event flow diagram is like this, Address comparator --> EXT OUT --> ECT---> EXT IN --> Counter-->ViewInst
Since the External input is a pulse, a counter has been used to convert that into a level trigger. So the counter initialized to 1, starts counting upon EXT IN trigger and becomes active when it reaches 0. Also the counter resource is programmed such a way that ViewInst is inactive when the counter is active and viceversa.
This feature would be useful in stopping trace on all trace sources when a kernel panic gets triggered for example without software intervention.
This feature can be enabled and configured on a ETM source by, echo 1 > /sys/bus/coresight/devices/<etmxx>/sync_stop_event echo <address> > /sys/bus/coresight/devices/<etmxx>/sync_stop_address
Signed-off-by: Linu Cherian lcherian@marvell.com --- .../coresight/coresight-etm4x-core.c | 167 ++++++++++++++++++ .../coresight/coresight-etm4x-sysfs.c | 64 +++++++ drivers/hwtracing/coresight/coresight-etm4x.h | 16 ++ 3 files changed, 247 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-core.c b/drivers/hwtracing/coresight/coresight-etm4x-core.c index e24252eaf8e4..73c57e03da2c 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-core.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-core.c @@ -60,6 +60,8 @@ static void etm4_set_default_config(struct etmv4_config *config); static int etm4_set_event_filters(struct etmv4_drvdata *drvdata, struct perf_event *event); static u64 etm4_get_access_type(struct etmv4_config *config); +static u64 etm4_get_comparator_access_type(struct etmv4_config *config); +static int etm4_get_next_comparator(struct etmv4_drvdata *drvdata, u32 type);
static enum cpuhp_state hp_online;
@@ -329,6 +331,146 @@ static void etm4_check_arch_features(struct etmv4_drvdata *drvdata, } #endif /* CONFIG_ETM4X_IMPDEF_FEATURE */
+static int etm4_get_next_counter(struct etmv4_drvdata *drvdata) +{ + int ctridx; + struct etmv4_config *config = &drvdata->config; + + /* find a counter that hasn't been initialised */ + for (ctridx = 0; ctridx < drvdata->nr_cntr; ctridx++) + if (config->cntr_val[ctridx] == 0) + break; + + /* all the counters have been configured already, bail out */ + if (ctridx == drvdata->nr_cntr) { + pr_debug("%s: no available counter found\n", __func__); + return -ENOSPC; + } + + return ctridx; +} + +static int etm4_get_next_rselector(struct etmv4_drvdata *drvdata) +{ + int rselector; + struct etmv4_config *config = &drvdata->config; + + for (rselector = 2; rselector < drvdata->nr_resource * 2; rselector++) + if (!config->res_ctrl[rselector]) + break; + + if (rselector == drvdata->nr_resource * 2) { + pr_debug("%s: no available resource selector found\n", + __func__); + return -ENOSPC; + } + + return rselector; +} + +static int etm4_rselector_config(struct etmv4_drvdata *drvdata, int resgrp, + int grpidx, bool inv) +{ + int rselector; + struct etmv4_config *config = &drvdata->config; + + rselector = etm4_get_next_rselector(drvdata); + if (rselector < 0) + goto out; + + config->res_ctrl[rselector] = resgrp << 16 | BIT(grpidx); + if (inv) + config->res_ctrl[rselector] |= 1 << 20; + +out: + return rselector; +} + +/* Trigger external output based on address comparator match event */ +static int etm4_trigger_extout_on_addrmatch(struct etmv4_drvdata *drvdata, + u64 address) +{ + int rselector, err = 0; + int comparator, type; + struct etmv4_config *config = &drvdata->config; + u64 access_type = etm4_get_comparator_access_type(config); + + type = ETM_ADDR_TYPE_STOP; + + /* Get a free single comparator */ + comparator = etm4_get_next_comparator(drvdata, type); + if (comparator < 0) { + err = comparator; + goto out; + } + + /* Configure the comparator */ + config->addr_val[comparator] = address; + config->addr_acc[comparator] = access_type; + config->addr_type[comparator] = type; + + /* Find a resorce selector to map this comparator */ + rselector = etm4_rselector_config(drvdata, ETM_RESGRP_SADDRCMP, + comparator, false); + if (!rselector) { + err = rselector; + goto out; + } + + /* Now finally connect external output with comparator */ + config->eventctrl0 = 0x0 << 7 | rselector; + +out: + return err; +} + + +/* Stop ViewInst function based on external input trigger */ +static int etm4_stop_viewinst_on_extin(struct etmv4_drvdata *drvdata) +{ + int err = 0; + int rselector, counter; + struct etmv4_config *config = &drvdata->config; + + /* Map a rselector to external input #0 */ + rselector = etm4_rselector_config(drvdata, ETM_RESGRP_EXTIN, + ETM_EXTIN_0, false); + if (!rselector) { + err = rselector; + goto out; + } + + /* Drive a down counter based on external input #0 */ + counter = etm4_get_next_counter(drvdata); + if (counter < 0) { + err = counter; + goto out; + } + + config->cntr_val[counter] = 1; /* Initial down counter value */ + config->cntr_ctrl[counter] = 0x0 << 16 | /* Normal mode */ + 0x0 << 7 | /* Select single resource selector */ + rselector; + + /* Map a resource selector to the down counter */ + rselector = etm4_rselector_config(drvdata, ETM_RESGRP_CNTRSEQ, + counter, true); + if (!rselector) { + err = rselector; + goto out; + } + + + /* Finally setup viewinst function */ + config->vinst_ctrl &= 0xffffff00; + config->vinst_ctrl = 0x0 << 7 | rselector; + config->vinst_ctrl |= BIT(9); + config->vinst_ctrl |= (0xb << 16); +out: + return err; +} + + static int etm4_enable_hw(struct etmv4_drvdata *drvdata) { int i, rc; @@ -347,6 +489,18 @@ static int etm4_enable_hw(struct etmv4_drvdata *drvdata) if (rc) goto done;
+ /* Stop viewInst function on address match */ + if (config->sync_stop_event) { + rc = etm4_trigger_extout_on_addrmatch(drvdata, + config->sync_stop_addr); + if (rc) + goto done; + rc = etm4_stop_viewinst_on_extin(drvdata); + if (rc) + goto done; + + } + /* Disable the trace unit before programming trace registers */ etm4x_relaxed_write32(csa, 0, TRCPRGCTLR);
@@ -892,11 +1046,23 @@ static void etm4_disable(struct coresight_device *csdev, local_set(&drvdata->mode, CS_MODE_DISABLED); }
+static int etm4_get_tevent_idx(struct coresight_device *csdev) +{ + struct etmv4_drvdata *drvdata = dev_get_drvdata(csdev->dev.parent); + struct etmv4_config *config = &drvdata->config; + + if (config->sync_stop_event) + return TRACE_EVENT_0; + else + return -1; +} + static const struct coresight_ops_source etm4_source_ops = { .cpu_id = etm4_cpu_id, .trace_id = etm4_trace_id, .enable = etm4_enable, .disable = etm4_disable, + .get_trace_event_idx = etm4_get_tevent_idx, };
static const struct coresight_ops etm4_cs_ops = { @@ -1335,6 +1501,7 @@ static void etm4_set_start_stop_filter(struct etmv4_config *config,
static void etm4_set_default_filter(struct etmv4_config *config) { + /* Trace everything 'default' filter achieved by no filtering */ config->viiectlr = 0x0;
diff --git a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c index a0640fa5c55b..d1fb904c3761 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-etm4x-sysfs.c @@ -522,6 +522,68 @@ static ssize_t event_store(struct device *dev, } static DEVICE_ATTR_RW(event);
+static ssize_t sync_stop_event_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + unsigned long val; + struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); + struct etmv4_config *config = &drvdata->config; + + val = config->sync_stop_event; + return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); +} + +static ssize_t sync_stop_event_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t size) +{ + unsigned long val; + struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); + struct etmv4_config *config = &drvdata->config; + + if (kstrtoul(buf, 16, &val)) + return -EINVAL; + + spin_lock(&drvdata->spinlock); + config->sync_stop_event = val & 0xFF; + spin_unlock(&drvdata->spinlock); + + return size; +} +static DEVICE_ATTR_RW(sync_stop_event); + +static ssize_t sync_stop_addr_show(struct device *dev, + struct device_attribute *attr, + char *buf) +{ + unsigned long val; + struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); + struct etmv4_config *config = &drvdata->config; + + val = config->sync_stop_addr; + return scnprintf(buf, PAGE_SIZE, "%#lx\n", val); +} + +static ssize_t sync_stop_addr_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t size) +{ + unsigned long val; + struct etmv4_drvdata *drvdata = dev_get_drvdata(dev->parent); + struct etmv4_config *config = &drvdata->config; + + if (kstrtoul(buf, 16, &val)) + return -EINVAL; + + spin_lock(&drvdata->spinlock); + config->sync_stop_addr = val; + spin_unlock(&drvdata->spinlock); + + return size; +} +static DEVICE_ATTR_RW(sync_stop_addr); + static ssize_t event_instren_show(struct device *dev, struct device_attribute *attr, char *buf) @@ -2278,6 +2340,8 @@ static struct attribute *coresight_etmv4_attrs[] = { &dev_attr_mode.attr, &dev_attr_pe.attr, &dev_attr_event.attr, + &dev_attr_sync_stop_event.attr, + &dev_attr_sync_stop_addr.attr, &dev_attr_event_instren.attr, &dev_attr_event_ts.attr, &dev_attr_syncfreq.attr, diff --git a/drivers/hwtracing/coresight/coresight-etm4x.h b/drivers/hwtracing/coresight/coresight-etm4x.h index e5b79bdb9851..4558446a8c04 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.h +++ b/drivers/hwtracing/coresight/coresight-etm4x.h @@ -513,6 +513,20 @@ #define ETM_CNTR_MAX_VAL 0xFFFF #define ETM_TRACEID_MASK 0x3f
+/* ETM resource group encoding */ +#define ETM_RESGRP_EXTIN 0x0 +#define ETM_RESGRP_PECMP 0x1 +#define ETM_RESGRP_CNTRSEQ 0x2 +#define ETM_RESGRP_SSCMP 0x3 +#define ETM_RESGRP_SADDRCMP 0x4 +#define ETM_RESGRP_ADDRRANGECMP 0x5 +#define ETM_RESGRP_CIDCMP 0x6 +#define ETM_RESGRP_VCIDCMP 0x7 + +#define ETM_EXTIN_0 0x0 +#define TRACE_EVENT_0 0x0 + + /* ETMv4 programming modes */ #define ETM_MODE_EXCLUDE BIT(0) #define ETM_MODE_LOAD BIT(1) @@ -804,6 +818,8 @@ struct etmv4_config { u32 vmid_mask1; u32 ext_inp; u8 s_ex_level; + u8 sync_stop_event; + u64 sync_stop_addr; };
/**
Hi Linu,
This requirement for combining CoreSight devices is covered by the CoreSight Configuration patchset[s]
The patches define a coresight configuration as a set of programmed features on a set of coresight devices. Configurations can be loaded via a kernel loadable module, with load via confifs to follow. Configurations can then be selected for operation using the configuration name on the perf command line.
The initial patchset is being merged here [https://lore.kernel.org/all/20210723165444.1048-2-mike.leach@linaro.org]
Follow up sets to provide additional resource management for ETMs,CTI programming, configfs support will follow on coresight/next once 5.15-rc1 is published.
Once these sets are complete, the programming of CTIs and ETMs covered by this patchset will be achieved by writing and loading a configuration, without the need to alter any additional driver code.
Regards
Mike
On Wed, 1 Sept 2021 at 12:02, Linu Cherian lcherian@marvell.com wrote:
This patchset adds support for stopping trace on all enabled coresight sources upon execution of a programmed instruction address.
ETM stop event is triggered by an instruction address match on a comparator. This address match event is then used to stop the tracing across all ETM source devices with the help of external input/output signals and ECT.
The instruction address for the stop event can be programmed using sysfs interface.
The event flow diagram is like this, Address comparator --> EXT OUT --> ECT---> EXT IN --> Counter-->ViewInst
The original intention of this patch is to stop all ETM sources at the time of kernel panic without software intervention so that it can be used as one of the building block while enabling panic/kdump support in coresight drivers [1]. But there can be other use cases like stopping trace on assertions or error functions etc. as well.
I am sending this patch as an RFC so as to get an early feedback on the approach taken for implementation and other inputs if any.
Few caveats:
- Testing was done only with sysfs interface using a arbitrary kernel symbol address. Perf support will be added later based on initial feedback.
- CTI hook for enabling trace event connection need to be rewritten to use existing support APIs.
[1] https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg1652258.html
Linu Cherian (2): coresight: Add support to setup Trace event signals coresight: etm4x: Add support to generate and synchronize stop event
drivers/hwtracing/coresight/coresight-core.c | 37 ++++ .../hwtracing/coresight/coresight-cti-core.c | 21 +++ drivers/hwtracing/coresight/coresight-cti.h | 3 + .../coresight/coresight-etm4x-core.c | 167 ++++++++++++++++++ .../coresight/coresight-etm4x-sysfs.c | 64 +++++++ drivers/hwtracing/coresight/coresight-etm4x.h | 16 ++ include/linux/coresight.h | 6 + 7 files changed, 314 insertions(+)
-- 2.31.1
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK
Hi Mike,
-----Original Message----- From: Mike Leach mike.leach@linaro.org Sent: Wednesday, September 8, 2021 9:42 PM To: Linu Cherian lcherian@marvell.com Cc: Mathieu Poirier mathieu.poirier@linaro.org; Suzuki K. Poulose suzuki.poulose@arm.com; Leo Yan leo.yan@linaro.org; Coresight ML coresight@lists.linaro.org; linuc.decode@gmail.com Subject: [EXT] Re: [RFC PATCH 0/2] Support for stopping trace on a programmed address
External Email
Hi Linu,
This requirement for combining CoreSight devices is covered by the CoreSight Configuration patchset[s]
The patches define a coresight configuration as a set of programmed features on a set of coresight devices. Configurations can be loaded via a kernel loadable module, with load via confifs to follow. Configurations can then be selected for operation using the configuration name on the perf command line.
The initial patchset is being merged here [https://urldefense.proofpoint.com/v2/url?u=https- 3A__lore.kernel.org_all_20210723165444.1048-2D2-2Dmike.leach- 40linaro.org&d=DwIBaQ&c=nKjWec2b6R0mOyPaz7xtfQ&r=DI9kird_6lFtBCV oGa5ogk3dJwsUlHLjLlgu0r46iU4&m=TH0tJTuBbNOqLx1VzaYxOl3UCDJCNV1a LWPQRyNi1uA&s=5rlzi9-n-nEkMJT_w0jjDzdvKocsjwa7rNJChtLQfSE&e= ]
Follow up sets to provide additional resource management for ETMs,CTI programming, configfs support will follow on coresight/next once 5.15-rc1 is published.
Once these sets are complete, the programming of CTIs and ETMs covered by this patchset will be achieved by writing and loading a configuration, without the need to alter any additional driver code.
Kindly please CC me when you submit this patchset.
Thanks.
Regards
Mike
On Wed, 1 Sept 2021 at 12:02, Linu Cherian lcherian@marvell.com wrote:
This patchset adds support for stopping trace on all enabled coresight sources upon execution of a programmed instruction address.
ETM stop event is triggered by an instruction address match on a
comparator.
This address match event is then used to stop the tracing across all ETM source devices with the help of external input/output signals and ECT.
The instruction address for the stop event can be programmed using sysfs interface.
The event flow diagram is like this, Address comparator --> EXT OUT --> ECT---> EXT IN --> Counter-- ViewInst
The original intention of this patch is to stop all ETM sources at the time of kernel panic without software intervention so that it can be used as one of the building block while enabling panic/kdump support in coresight drivers [1]. But there can be other use cases like stopping trace on assertions or error functions etc. as well.
I am sending this patch as an RFC so as to get an early feedback on the approach taken for implementation and other inputs if any.
Few caveats:
- Testing was done only with sysfs interface using a arbitrary kernel symbol address. Perf support will be added later based on initial feedback.
- CTI hook for enabling trace event connection need to be rewritten to use existing support APIs.
[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-
2Darchive.com_linux-2Dkernel- 40vger.kernel.org_msg1652258.html&d=DwIBaQ&c=nKjWec2b6R0mOyPaz7 xtfQ&r=DI9kird_6lFtBCVoGa5ogk3dJwsUlHLjLlgu0r46iU4&m=TH0tJTuBbNOq Lx1VzaYxOl3UCDJCNV1aLWPQRyNi1uA&s=zq0nWzbEsnvwpyxph6TU- XPPB2VKjLOsIWvOGYTwJmE&e=
Linu Cherian (2): coresight: Add support to setup Trace event signals coresight: etm4x: Add support to generate and synchronize stop event
drivers/hwtracing/coresight/coresight-core.c | 37 ++++ .../hwtracing/coresight/coresight-cti-core.c | 21 +++ drivers/hwtracing/coresight/coresight-cti.h | 3 + .../coresight/coresight-etm4x-core.c | 167 ++++++++++++++++++ .../coresight/coresight-etm4x-sysfs.c | 64 +++++++ drivers/hwtracing/coresight/coresight-etm4x.h | 16 ++ include/linux/coresight.h | 6 + 7 files changed, 314 insertions(+)
-- 2.31.1
-- Mike Leach Principal Engineer, ARM Ltd. Manchester Design Centre. UK