mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 05:27:07 +02:00
coresight: etb10: Fix handling of perf mode
[ Upstream commit 987d1e8dcd ]
If the ETB is already enabled in sysfs mode, the ETB reports
success even if a perf mode is requested. Fix this by checking
the requested 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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f17c179522
commit
3fa9b782df
|
|
@ -147,6 +147,10 @@ static int etb_enable(struct coresight_device *csdev, u32 mode)
|
|||
if (val == CS_MODE_PERF)
|
||||
return -EBUSY;
|
||||
|
||||
/* Don't let perf disturb sysFS sessions */
|
||||
if (val == CS_MODE_SYSFS && mode == CS_MODE_PERF)
|
||||
return -EBUSY;
|
||||
|
||||
/* Nothing to do, the tracer is already enabled. */
|
||||
if (val == CS_MODE_SYSFS)
|
||||
goto out;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user