mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
coresight: etb10: Fix handling of perf mode
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 <[email protected]> Signed-off-by: Suzuki K Poulose <[email protected]> Signed-off-by: Mathieu Poirier <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
c71369de02
commit
987d1e8dcd
1 changed files with 4 additions and 0 deletions
|
|
@ -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 a new issue