aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
diff options
context:
space:
mode:
authorMathieu Poirier <mathieu.poirier@linaro.org>2016-02-17 17:51:52 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-20 14:11:01 -0800
commit22fd532eaa0c24d86e23d8e9e3b7feac4a8cac80 (patch)
treec979062322116b12cf155ce5e22e9c11b20cbb16 /drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
parentcoresight: etm3x: splitting struct etm_drvdata (diff)
downloadlinux-dev-22fd532eaa0c24d86e23d8e9e3b7feac4a8cac80.tar.xz
linux-dev-22fd532eaa0c24d86e23d8e9e3b7feac4a8cac80.zip
coresight: etm3x: adding operation mode for etm_enable()
Adding a new mode to source API enable() in order to distinguish where the request comes from. That way it is possible to perform different operations based on where the request was issued from. The ETM4x driver is also modified to keep in sync with the new interface. Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight/coresight-etm3x-sysfs.c')
-rw-r--r--drivers/hwtracing/coresight/coresight-etm3x-sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
index 456df2378a6f..387c79fd9d5e 100644
--- a/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
+++ b/drivers/hwtracing/coresight/coresight-etm3x-sysfs.c
@@ -716,7 +716,7 @@ static ssize_t cntr_val_show(struct device *dev,
struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent);
struct etm_config *config = &drvdata->config;
- if (!drvdata->enable) {
+ if (!local_read(&drvdata->mode)) {
spin_lock(&drvdata->spinlock);
for (i = 0; i < drvdata->nr_cntr; i++)
ret += sprintf(buf, "counter %d: %x\n",
@@ -935,7 +935,7 @@ static ssize_t seq_curr_state_show(struct device *dev,
struct etm_drvdata *drvdata = dev_get_drvdata(dev->parent);
struct etm_config *config = &drvdata->config;
- if (!drvdata->enable) {
+ if (!local_read(&drvdata->mode)) {
val = config->seq_curr_state;
goto out;
}