diff options
| author | Suzuki K Poulose <suzuki.poulose@arm.com> | 2018-09-20 15:17:52 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-25 14:09:17 -0400 |
| commit | cad5f8d399bbe3c4ed61a21f649d61b09f6efb7b (patch) | |
| tree | 24987ce1dcd12ea40bd802ceddf28952d02ec35b /drivers/hwtracing/coresight | |
| parent | 96a7f644006ecc05eaaa1a5d09373d0ee63beb0a (diff) | |
coresight: tmc-etr: Relax collection of trace from sysfs mode
Since the ETR now uses mode specific buffers, we can reliably
provide the trace data captured in sysfs mode, even when the ETR
is operating in PERF mode.
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/coresight')
| -rw-r--r-- | drivers/hwtracing/coresight/coresight-tmc-etr.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/hwtracing/coresight/coresight-tmc-etr.c b/drivers/hwtracing/coresight/coresight-tmc-etr.c index 2d6f428176ff..bafd73e71c4c 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-etr.c +++ b/drivers/hwtracing/coresight/coresight-tmc-etr.c | |||
| @@ -1168,19 +1168,17 @@ int tmc_read_prepare_etr(struct tmc_drvdata *drvdata) | |||
| 1168 | goto out; | 1168 | goto out; |
| 1169 | } | 1169 | } |
| 1170 | 1170 | ||
| 1171 | /* Don't interfere if operated from Perf */ | 1171 | /* |
| 1172 | if (drvdata->mode == CS_MODE_PERF) { | 1172 | * We can safely allow reads even if the ETR is operating in PERF mode, |
| 1173 | ret = -EINVAL; | 1173 | * since the sysfs session is captured in mode specific data. |
| 1174 | goto out; | 1174 | * If drvdata::sysfs_data is NULL the trace data has been read already. |
| 1175 | } | 1175 | */ |
| 1176 | |||
| 1177 | /* If sysfs_buf is NULL the trace data has been read already */ | ||
| 1178 | if (!drvdata->sysfs_buf) { | 1176 | if (!drvdata->sysfs_buf) { |
| 1179 | ret = -EINVAL; | 1177 | ret = -EINVAL; |
| 1180 | goto out; | 1178 | goto out; |
| 1181 | } | 1179 | } |
| 1182 | 1180 | ||
| 1183 | /* Disable the TMC if we are trying to read from a running session */ | 1181 | /* Disable the TMC if we are trying to read from a running session. */ |
| 1184 | if (drvdata->mode == CS_MODE_SYSFS) | 1182 | if (drvdata->mode == CS_MODE_SYSFS) |
| 1185 | tmc_etr_disable_hw(drvdata); | 1183 | tmc_etr_disable_hw(drvdata); |
| 1186 | 1184 | ||
