Re: [PATCH net-next v2 2/3] net: ti: icss-iep: Enable compare events

From: Diogo Ivo
Date: Thu Jun 06 2024 - 11:44:09 EST


On 6/6/24 2:49 PM, Paolo Abeni wrote:
On Thu, 2024-06-06 at 14:28 +0100, Diogo Ivo wrote:
With this said it should be possible to change this spinlock to a mutex as
well, since all the possibilities for concurrency happen outside of
interrupt context. I can add a patch to this series doing that if you
agree with my reasoning above and find it beneficial. For this some
comments from TI would also be good to have in case I missed something
or there is some other factor that I am not aware of.

It looks like that most critical section protected by iep->irq_lock are
already under ptp_clk_mutex protection. AFAICS all except the one
introduced by this patch.

If so, you could acquire such mutex even in icss_iep_cap_cmp_work() and
completely remove iep->irq_lock.

That is a much better approach, I'll do that and post v3.

Best regards,
Diogo