From: mike.leach@linaro.org (Mike Leach)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/3] coresight: etm4x: Adds trace return stack option programming for ETMv4.
Date: Tue, 11 Jul 2017 12:25:51 +0100 [thread overview]
Message-ID: <1499772351-2210-4-git-send-email-mike.leach@linaro.org> (raw)
In-Reply-To: <1499772351-2210-1-git-send-email-mike.leach@linaro.org>
Adds handling to program the return stack option into ETMv4 hardware if
specified in the perf command line.
If option is not supported by the hardware then it will be ignored.
This allows capture to move between core/ETM combinations that have the
hardware support to those that do not.
Signed-off-by: Mike Leach <mike.leach@linaro.org>
---
drivers/hwtracing/coresight/coresight-etm4x.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c
index d1340fb..fb3ce34 100644
--- a/drivers/hwtracing/coresight/coresight-etm4x.c
+++ b/drivers/hwtracing/coresight/coresight-etm4x.c
@@ -224,6 +224,10 @@ static int etm4_parse_event_config(struct etmv4_drvdata *drvdata,
if (attr->config & BIT(ETM_OPT_TS))
/* bit[11], Global timestamp tracing bit */
config->cfg |= BIT(11);
+ /* return stack - enable if selected and supported */
+ if ((attr->config & BIT(ETM_OPT_RETSTK)) && drvdata->retstack)
+ /* bit[12], Return stack enable bit */
+ config->cfg |= BIT(12);
out:
return ret;
--
2.7.4
next prev parent reply other threads:[~2017-07-11 11:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-11 11:25 [PATCH 0/3] drivers: coresight: Adds return stack option handling Mike Leach
2017-07-11 11:25 ` [PATCH 1/3] coresight: pmu: Adds return stack option to perf coresight pmu Mike Leach
2017-07-11 11:25 ` [PATCH 2/3] coresight: ptm: Adds trace return stack option programming for PTM Mike Leach
2017-07-11 11:25 ` Mike Leach [this message]
2017-07-12 15:15 ` [PATCH 0/3] drivers: coresight: Adds return stack option handling Mathieu Poirier
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=1499772351-2210-4-git-send-email-mike.leach@linaro.org \
--to=mike.leach@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).