Callbacks run under the DPLL core domain locks instead of dpll_lock. On E825 the TXC DPLL, the TSPLL DPLL and the other objects of a PF are in three domains, and callbacks of pins of an external DPLL run under the domain of that DPLL, so only pf->dplls.lock serializes them with each other.
Reviewed-by: Petr Oros <[email protected]> Signed-off-by: Ivan Vecera <[email protected]> --- Changes in v2: - Described the three domains of an E825 PF (Sashiko) --- drivers/net/ethernet/intel/ice/ice_dpll.c | 4 ++-- drivers/net/ethernet/intel/ice/ice_dpll.h | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index 0877827a6521cc..5d0a52d86f03e8 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.c +++ b/drivers/net/ethernet/intel/ice/ice_dpll.c @@ -1178,8 +1178,8 @@ ice_dpll_input_state_get(const struct dpll_pin *pin, void *pin_priv, * peer via dpll netlink learn about the update. * * Context: Called from dpll_pin_ops callbacks after pf->dplls.lock is - * released. Uses __dpll_pin_change_ntf() because dpll_lock is - * still held by the dpll netlink layer. + * released. Uses __dpll_pin_change_ntf() because the domain lock + * is still held by the dpll core. */ static void ice_dpll_sw_pin_notify_peer(struct ice_dplls *d, struct ice_dpll_pin *changed) diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.h b/drivers/net/ethernet/intel/ice/ice_dpll.h index bce0bea9a664bc..c522c5fcbcce52 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.h +++ b/drivers/net/ethernet/intel/ice/ice_dpll.h @@ -164,6 +164,11 @@ struct ice_dpll { * tx_refclks usage map), acquire pf->dplls.lock first, then * ctrl_pf->dplls.lock. Skip the second acquire when pf == ctrl_pf * to avoid recursive locking. + * - The DPLL core serializes callbacks per (module, clock_id) domain. On + * E825 the TXC DPLL, the TSPLL DPLL and the other objects of a PF, such + * as the RCLK pin, use three different clock_ids, and callbacks of the + * SYNCE and TIME_REF pins of an external DPLL run under the domain of + * that DPLL, so only @lock serializes all of them with each other. * - @txclk_notify_rwsem is held for read across * ice_txclk_update_and_notify(), including the out-of-lock * dpll_*_change_ntf() calls. ice_dpll_deinit() takes the write side -- 2.56.0
