mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
UPSTREAM: coresight: tmc-etr: Relax collection of trace from sysfs mode
(Upstream commit cad5f8d399).
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>
Bug: 140266694
Change-Id: I2c4849f9664de698cba483c5ba897bce1f34e54b
Signed-off-by: Yabin Cui <yabinc@google.com>
This commit is contained in:
committed by
Yabin Cui
parent
152fedd00f
commit
cdd97df049
@@ -1168,19 +1168,17 @@ int tmc_read_prepare_etr(struct tmc_drvdata *drvdata)
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Don't interfere if operated from Perf */
|
||||
if (drvdata->mode == CS_MODE_PERF) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* If sysfs_buf is NULL the trace data has been read already */
|
||||
/*
|
||||
* We can safely allow reads even if the ETR is operating in PERF mode,
|
||||
* since the sysfs session is captured in mode specific data.
|
||||
* If drvdata::sysfs_data is NULL the trace data has been read already.
|
||||
*/
|
||||
if (!drvdata->sysfs_buf) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Disable the TMC if we are trying to read from a running session */
|
||||
/* Disable the TMC if we are trying to read from a running session. */
|
||||
if (drvdata->mode == CS_MODE_SYSFS)
|
||||
tmc_etr_disable_hw(drvdata);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user