[PATCH] coresight: Don't immediately close events that are run on invalid CPU/sink combos
James Clark
james.clark at arm.com
Wed Sep 22 05:53:42 PDT 2021
On 22/09/2021 10:24, Suzuki K Poulose wrote:
> On 21/09/2021 14:02, James Clark wrote:
[...]
>> - event->hw.state = 0;
>> -
>> /* Finally enable the tracer */
>> if (source_ops(csdev)->enable(csdev, event, CS_MODE_PERF))
>> goto fail_disable_path;
>> +out:
>> + /* Tell the perf core the event is alive */
>> + event->hw.state = 0;
>> /* Save the event_data for this ETM */
>> ctxt->event_data = event_data;
>> -out:
>> return;
>
> Hi James,
>
> I think this problematic. The "out" label is reached from the "failed"
> path. So, we would reset the STOPPED state. I think we should simply
> return when we reach the "fail" label.
>
> Please could you resend this patch with the changes.
>
> Kind regards
> Suzuki
>
Oops yes I missed that, I've resubmitted. It probably would have just about
worked because from my testing it seems like the event isn't re-enabled
if perf_aux_output_end() is called from start regardless of the STOPPED/RUNNING
state.
Thanks
James
More information about the linux-arm-kernel
mailing list