Re: [PATCH net-next v5 3/4] dpll: zl3073x: add per-DPLL serialization lock

From: Ivan Vecera

Date: Thu Jun 04 2026 - 11:19:50 EST


On 6/4/26 3:40 AM, Jakub Kicinski wrote:
On Sun, 31 May 2026 21:44:22 +0200 Ivan Vecera wrote:
Add a per-DPLL mutex that serializes all operations on a given DPLL
channel across DPLL netlink callbacks, the periodic kthread worker,

Sounds like there are already two entities accessing the state?
If so why is this not a fix?

Yes, but prior NCO pin implementation (patch 4) this was not a problem.

1. All DPLL callbacks are serialized by the DPLL subsys mutex and they
- read status and measurements from cache (ref, chan, out and synth)
- writes config into HW and cache

2. Periodic function
- reads config from cache (...)
- reads status and measurements from HW and writes to cache (...)
- emits notifications when something was changed

All accesses to cache objects' fields are atomic.

With patch 4 there is a change because at least df_offset can be written
by both (DPLL callback during switching or periodic function during
measurement). At this point it is reasonable and safe to do explicit
locking on DPLL level.

And the next series I have in my queue (that depends on this series)
introduces the PHC support into zl3073x and there will be a need to
serialize DPLL and PTP callbacks.

Thanks,
Ivan