Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1362947
| From | Mathieu Poirier <mathieu.poirier@linaro.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 14/14] coresight: configuring ETF in FIFO mode when acting as link |
| Date | 2016-03-22 21:30 +0100 |
| Message-ID | <rfB6a-1hK-9@gated-at.bofh.it> (permalink) |
| References | <rfB69-1hK-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
When part of a path but not identified as a sink, the EFT has to
be configured as a link and placed in HW FIFO mode. As such when
enabling a path, call the right configuration function based on
the role the ETF if playing in this trace run.
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
---
drivers/hwtracing/coresight/coresight.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/hwtracing/coresight/coresight.c b/drivers/hwtracing/coresight/coresight.c
index 6ec2b66af9ee..fa7ecbd99901 100644
--- a/drivers/hwtracing/coresight/coresight.c
+++ b/drivers/hwtracing/coresight/coresight.c
@@ -287,15 +287,27 @@ int coresight_enable_path(struct list_head *path, u32 mode)
{
int ret = 0;
+ u32 type;
struct coresight_node *nd;
struct coresight_device *csdev, *parent, *child;
list_for_each_entry_reverse(nd, path, link) {
csdev = nd->csdev;
+ type = csdev->type;
- switch (csdev->type) {
+ /*
+ * ETF devices are tricky... They can be a link or a sink,
+ * depending on how they are configured. If an ETF has been
+ * "activated" it will be configured as a sink, otherwise
+ * go ahead with the link configuration.
+ */
+ if (type == CORESIGHT_DEV_TYPE_LINKSINK)
+ type = (csdev == coresight_get_sink(path)) ?
+ CORESIGHT_DEV_TYPE_SINK :
+ CORESIGHT_DEV_TYPE_LINK;
+
+ switch (type) {
case CORESIGHT_DEV_TYPE_SINK:
- case CORESIGHT_DEV_TYPE_LINKSINK:
ret = coresight_enable_sink(csdev, mode);
if (ret)
goto err;
@@ -304,6 +316,7 @@ int coresight_enable_path(struct list_head *path, u32 mode)
/* sources are enabled from either sysFS or Perf */
break;
case CORESIGHT_DEV_TYPE_LINK:
+ case CORESIGHT_DEV_TYPE_LINKSINK:
parent = list_prev_entry(nd, link)->csdev;
child = list_next_entry(nd, link)->csdev;
ret = coresight_enable_link(csdev, parent, child);
--
2.1.4
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/14] coresight: tmc: make driver usable by Perf Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 12/14] coresight: tmc: implementing TMC-ETF AUX space API Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 14/14] coresight: configuring ETF in FIFO mode when acting as link Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 11/14] coresight: tmc: keep track of memory width Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 07/14] coresight: tmc: making disable function reusable Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 08/14] coresight: tmc: allocating memory when needed Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 05/14] coresight: tmc: splitting driver in ETB/ETF and ETR components Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 09/14] coresight: tmc: adding mode of operation for link/sinks Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 02/14] coresight: tmc: waiting for TMCReady bit before programming Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 01/14] coresight: tmc: modifying naming convention Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
Re: [PATCH 01/14] coresight: tmc: modifying naming convention "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-03-23 11:40 +0100
[PATCH 03/14] coresight: tmc: re-implementing tmc_read_prepare/unprepare() functions Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
Re: [PATCH 03/14] coresight: tmc: re-implementing tmc_read_prepare/unprepare() functions "Suzuki K. Poulose" <Suzuki.Poulose@arm.com> - 2016-03-23 11:40 +0100
Re: [PATCH 03/14] coresight: tmc: re-implementing tmc_read_prepare/unprepare() functions Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-24 17:40 +0100
Re: [PATCH 03/14] coresight: tmc: re-implementing tmc_read_prepare/unprepare() functions Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-24 20:20 +0100
[PATCH 13/14] coresight: tmc: implementing TMC-ETR AUX space API Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 04/14] coresight: tmc: introducing new header file Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 10/14] coresight: tmc: make sysFS and Perf mode mutually exclusive Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
[PATCH 06/14] coresight: tmc: making prepare/unprepare functions generic Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-03-22 21:30 +0100
csiph-web