Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: muhammadabdul.wahab@centralesupelec.fr (Muhammad Abdul WAHAB)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3] Adding missing features of Coresight PTM components
Date: Thu, 6 Oct 2016 17:57:07 +0200	[thread overview]
Message-ID: <04170bc7-a947-ae75-cb14-7989a6cb4870@centralesupelec.fr> (raw)
In-Reply-To: <CANLsYkyPTtiGsfKg13ZY2pgCC3rh+MfirMwTrLG1=TZ5gUJqzA@mail.gmail.com>

Hi,

 > Where is ETMCR_RETURN_STACK_EN defined?  Did you send me code that
 > doesn't compile?

I changed the naming in the .h file before submitting it and I forgot to 
change it in .c file. I am sorry. It is defined in coresight-etm.h.
Here is the correct patch.
---
  drivers/hwtracing/coresight/coresight-etm.h         |  5 +++++
  drivers/hwtracing/coresight/coresight-etm3x-sysfs.c | 10 ++++++++++
  2 files changed, 15 insertions(+)

diff --git a/drivers/hwtracing/coresight/coresight-etm.h 
b/drivers/hwtracing/coresight/coresight-etm.h
index 4a18ee4..ad063d7 100644
--- a/drivers/hwtracing/coresight/coresight-etm.h
+++ b/drivers/hwtracing/coresight/coresight-etm.h
@@ -89,11 +89,13 @@
  /* ETMCR - 0x00 */
  #define ETMCR_PWD_DWN		BIT(0)
  #define ETMCR_STALL_MODE	BIT(7)
+#define ETMCR_BRANCH_BROADCAST	BIT(8)
  #define ETMCR_ETM_PRG		BIT(10)
  #define ETMCR_ETM_EN		BIT(11)
  #define ETMCR_CYC_ACC		BIT(12)
  #define ETMCR_CTXID_SIZE	(BIT(14)|BIT(15))
  #define ETMCR_TIMESTAMP_EN	BIT(28)
+#define ETMCR_RETURN_STACK	BIT(29)
  /* ETMCCR - 0x04 */
  #define ETMCCR_FIFOFULL		BIT(23)
  /* ETMPDCR - 0x310 */
@@ -110,8 +112,11 @@
  #define ETM_MODE_STALL		BIT(2)
  #define ETM_MODE_TIMESTAMP	BIT(3)
  #define ETM_MODE_CTXID		BIT(4)
+#define ETM_MODE_BBROAD		BIT(5)
+#define ETM_MODE_RET_STACK	BIT(6)
  #define ETM_MODE_ALL		(ETM_MODE_EXCLUDE | ETM_MODE_CYCACC | \
  				 ETM_MODE_STALL | ETM_MODE_TIMESTAMP | \
+				 ETM_MODE_BBROAD | ETM_MODE_RET_STACK | \
  				 ETM_MODE_CTXID | ETM_MODE_EXCL_KERN | \
  				 ETM_MODE_EXCL_USER)

diff --git a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c 
b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
index 5ea0909..a76009a 100644
--- a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
@@ -164,6 +164,16 @@ static ssize_t mode_store(struct device *dev,
  	else
  		config->ctrl &= ~ETMCR_CTXID_SIZE;

+	if (config->mode & ETM_MODE_BBROAD)
+		config->ctrl |= ETMCR_BRANCH_BROADCAST;
+	else
+		config->ctrl &= ~ETMCR_BRANCH_BROADCAST;
+
+	if (config->mode & ETM_MODE_RET_STACK)
+		config->ctrl |= ETMCR_RETURN_STACK;
+	else
+		config->ctrl &= ~ETMCR_RETURN_STACK;
+
  	if (config->mode & (ETM_MODE_EXCL_KERN | ETM_MODE_EXCL_USER))
  		etm_config_trace_mode(config);

-- 
1.9.1

  reply	other threads:[~2016-10-06 15:57 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-05 11:42 [PATCH v2] Adding missing features of Coresight PTM components Muhammad Abdul WAHAB
2016-10-05 21:15 ` Mathieu Poirier
2016-10-06 12:20   ` Muhammad Abdul WAHAB
2016-10-06 12:18 ` [PATCH v3] " Muhammad Abdul WAHAB
2016-10-06 15:52   ` Mathieu Poirier
2016-10-06 15:57     ` Muhammad Abdul WAHAB [this message]
2016-10-06 16:10       ` Mathieu Poirier
2016-10-07 12:16   ` [PATCH v4] " Muhammad Abdul WAHAB
2016-10-07 21:44     ` 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=04170bc7-a947-ae75-cb14-7989a6cb4870@centralesupelec.fr \
    --to=muhammadabdul.wahab@centralesupelec.fr \
    --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