diff options
| author | Leo Yan <[email protected]> | 2025-04-01 18:07:06 +0000 |
|---|---|---|
| committer | Suzuki K Poulose <[email protected]> | 2025-05-14 10:56:17 +0000 |
| commit | d5f7e4bea90f2e0630b0c76b0f6cf64304c5b514 (patch) | |
| tree | 00b4fadc6f5b24715cd3aa5dfb7c314bc6089846 /net/lapb/lapb_timer.c | |
| parent | coresight: perf: Support AUX trace pause and resume (diff) | |
| download | kernel-d5f7e4bea90f2e0630b0c76b0f6cf64304c5b514.tar.gz kernel-d5f7e4bea90f2e0630b0c76b0f6cf64304c5b514.zip | |
coresight: tmc: Re-enable sink after buffer update
The buffer update callbacks disable the sink before syncing data but
misses to re-enable it afterward. This is fine in the general flow,
because the sink will be re-enabled the next time the PMU event is
activated.
However, during AUX pause and resume, if the sink is disabled in the
buffer update callback, there is no chance to re-enable it when AUX
resumes.
To address this, the callbacks now check the event state
'event->hw.state'. If the event is an active state (0), the sink is
re-enabled.
For the TMC ETR driver, buffer updates are not fully protected by
the driver's spinlock. In this case, the sink is not re-enabled if its
reference counter is 0, in order to avoid race conditions where the sink
may have been completely disabled.
Signed-off-by: Leo Yan <[email protected]>
Reviewed-by: Mike Leach <[email protected]>
Reviewed-by: James Clark <[email protected]>
Signed-off-by: Suzuki K Poulose <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'net/lapb/lapb_timer.c')
0 files changed, 0 insertions, 0 deletions
