Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1496719

Re: [PATCH v3] Adding missing features of Coresight PTM components

From Muhammad Abdul WAHAB <muhammadabdul.wahab@centralesupelec.fr>
Newsgroups linux.kernel
Subject Re: [PATCH v3] Adding missing features of Coresight PTM components
Date 2016-10-06 18:00 +0200
Message-ID <spjfs-2fb-19@gated-at.bofh.it> (permalink)
References <soSRX-qq-1@gated-at.bofh.it> <spfOx-8rx-3@gated-at.bofh.it> <spjfs-2fb-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] Adding missing features of Coresight PTM components Muhammad Abdul WAHAB <muhammadabdul.wahab@centralesupelec.fr> - 2016-10-05 13:50 +0200
  Re: [PATCH v2] Adding missing features of Coresight PTM components Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-10-05 23:20 +0200
    Re: [PATCH v2] Adding missing features of Coresight PTM components Muhammad Abdul WAHAB <muhammadabdul.wahab@centralesupelec.fr> - 2016-10-06 14:30 +0200
  [PATCH v3] Adding missing features of Coresight PTM components Muhammad Abdul WAHAB <muhammadabdul.wahab@centralesupelec.fr> - 2016-10-06 14:20 +0200
    Re: [PATCH v3] Adding missing features of Coresight PTM components Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-10-06 18:00 +0200
      Re: [PATCH v3] Adding missing features of Coresight PTM components Muhammad Abdul WAHAB <muhammadabdul.wahab@centralesupelec.fr> - 2016-10-06 18:00 +0200
        Re: [PATCH v3] Adding missing features of Coresight PTM components Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-10-06 18:20 +0200
    [PATCH v4] Adding missing features of Coresight PTM components Muhammad Abdul WAHAB <muhammadabdul.wahab@centralesupelec.fr> - 2016-10-07 14:20 +0200
      Re: [PATCH v4] Adding missing features of Coresight PTM components Mathieu Poirier <mathieu.poirier@linaro.org> - 2016-10-07 23:50 +0200

csiph-web