From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793967078; b=lxul9wCGiQSi0fmY74Cxhu6cMVjM5fGAWScz8gE9AjKgBGHvw7ZQoywkoGUggoJhCQq+ S6BHncU6LyeAh6FpM2oUIpuW5wolfEiFMFCgI1SNHs+uyQP0ypEMaT/7Jvgn/jGN/wsP9 0XixqSEdWeA2TzlBtBuCCrIwxiI2kS06W2T09R5yP5KXifndmGothOg0ilpk3ejXvwLKN th0VIIuGZn3LsCCJlsaJTZn+nE9v3qm6k3RgPXaRcbsJDxy/FLnxxhvQOSqrBXYL9tplL b1TQtSNGEts53RibeD5op5GoEQ7W8IHowpahqpy2EdAXEu9xhApzRuTVwzwsy8HikLA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1793967078; h=DMARC-Filter:DKIM-Signature:Received:X-MC-Unique: X-Mimecast-MFC-AGG-ID:Received:Received:From:To:Cc:Subject:Date: Message-ID:In-Reply-To:References:MIME-Version: Content-Transfer-Encoding:X-Scanned-By; bh=vSoK9k8Jjl0Fge7FipT1654PSTW1jRBxZt2UfEkmOE8=; b=5kqKyxjeQbd0W5bbMcYngWAJNvuZY3fBHx42EaSWWPS5AL9HTXd/0uWlE5RAICgVmSuA 892k6z2glGk7B/nt34XA71gqFuB7+eFmhc2F9h/fmahMSlCLoej2HmESA7HkxIIDN/mxB ofUnOkyMoy4uEu4/oivbAiBHaYedRdaJEuILilxzE7TJjJvmXPjmvnqMIYvIJd58ZesJx yywteW6XtXx/4N539+YoOmuzpiRz6/ZqnVrWSsSz8apAsZt5otajIQvYC+w7VmXDfkOoa tXVdAB3tX2fiLEoOsZM4vxIj9K4tDj+s1quCAXQ7F1TEs3Pf0BXIbOUeRk7aCFWnvog== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b="d8MUv/Od"; arc=none smtp.remote-ip=170.10.129.124 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5ACC4606EEAD for ; Fri, 6 Nov 2026 12:11:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 5ACC4606EEAD Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=d8MUv/Od DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1793967077; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vSoK9k8Jjl0Fge7FipT1654PSTW1jRBxZt2UfEkmOE8=; b=d8MUv/OdZwZQX1e+uvXnXOmHP/pMemxgs1UWpTBLdNtPtGjkutxkkRRztIf53pGXMB7HMk CyD12hVRGf1+NBtfj2XJdnI6R6Z3lgk1p6vuNNjp1nMa4Her3267S9OJuonmrVnAzvClYL E+wHLaF6cjGK/IXX9czxyruzuPK7QyU= Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-387-C4dsfAmUOR6APzuVeSqlQQ-1; Fri, 06 Nov 2026 07:11:14 -0500 X-MC-Unique: C4dsfAmUOR6APzuVeSqlQQ-1 X-Mimecast-MFC-AGG-ID: C4dsfAmUOR6APzuVeSqlQQ_1793967071 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 783D21800576; Fri, 6 Nov 2026 12:11:11 +0000 (UTC) Received: from ivecera-thinkpadp16vgen1.tpbc.csb (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A537318001CA; Fri, 6 Nov 2026 12:11:05 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: Vadim Fedorenko , Arkadiusz Kubalewski , Jiri Pirko , Jonathan Corbet , Shuah Khan , Randy Dunlap , Min Li , Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org, Grzegorz Nitka , Karol Kolacinski , Saeed Mahameed , Tariq Toukan , Petr Oros Subject: [PATCH net-next 09/10] ice: dpll: update locking comments Date: Fri, 6 Nov 2026 13:10:04 +0100 Message-ID: <20261106121005.1327603-10-ivecera@redhat.com> In-Reply-To: <20261106121005.1327603-1-ivecera@redhat.com> References: <20261106121005.1327603-1-ivecera@redhat.com> X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Callbacks run under the DPLL core domain locks instead of dpll_lock. Note that callbacks of pins of an external DPLL run under the domain of that DPLL, so only pf->dplls.lock serializes them with the rest of the driver. Signed-off-by: Ivan Vecera --- drivers/net/ethernet/intel/ice/ice_dpll.c | 4 ++-- drivers/net/ethernet/intel/ice/ice_dpll.h | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/intel/ice/ice_dpll.c b/drivers/net/ethernet/intel/ice/ice_dpll.c index d6302409a2dacf..07cbd4cf0160ca 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 4ba76e2e2e0b01..39e041a30090d0 100644 --- a/drivers/net/ethernet/intel/ice/ice_dpll.h +++ b/drivers/net/ethernet/intel/ice/ice_dpll.h @@ -165,6 +165,9 @@ 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. + * - Callbacks of the SYNCE and TIME_REF pins of an external DPLL run under + * the DPLL core domain lock of that DPLL, not of the TXC and TSPLL DPLLs, + * so only @lock serializes them with the callbacks of these DPLLs. * - @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