From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A5E924BBF0 for ; Fri, 8 May 2026 10:32:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778236370; cv=none; b=dEM/0c1ANFRlgM1tYXXupvCATOu59Am+Fs8N3PycbTxZWYYKwES5T0DU3QHmOzaTTmGGyReLznxLhUGeWuBhPDJOmwXmnJF/BNUdBs7CYLWkguaFDh2KC78ItvjJgzhrRxO5aZgvb6gYeukPbVeImRfYc/JTaIgnhZv6cBcVe7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778236370; c=relaxed/simple; bh=XFgOhQSea8H/x0Y1jr/TE2OHafMyIAqEOhW7qRyIjKU=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=RIL21j0GD48PPMi4GH9eNkesjp8PtfHWgjQjLj0GmPLWbTMgvQ50yx8p4isX1aODPUEsog/KhyLy9R2LU4ofGTn+bO0xCzog7kHUMONHPLj79VKfk5zWHDqy16c99d0NsmCVeDzQy45EC8PhJguXMUJ23dX+VYqm4Zqeg7zE7dQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=Y3cNzZTy; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=D43va9CY; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="Y3cNzZTy"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="D43va9CY" Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6485ABui2199545 for ; Fri, 8 May 2026 10:32:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 88KTNTZQBYZHxyZCHSKo558FfLLokQHJQxk8gQgi94s=; b=Y3cNzZTyONFzI6nD RRoYSXq4Yo6i/4bvOB0el/qeSnOg0s48t3R5isRqEWv3KtnoXaUgueHiw7OJV5s2 WVNKeB+OZ73vAKO+nb2ORPICMlF1bTlWNZDW5IzajqNlhLY/nmUuVSFC4qIjmz3x 5Uzur8ETia0DEe54EAzf1TpCli6lunwWBAtsnqtwYwWLdK0Mif448/97sM5uUaHh HdhoCgkkfU+F9Wsw1/8uHai2Mc0vfkgW3eOM5j2I9avOy5b07oZYObgFM1eafnbu O6EVEqzDaXPdHJW8QmMMrx64WAkIWKGsxSmt4u/fhGuU8pomyeFptQqPm9cd+KBs gxd1IQ== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4e119sjvj7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 08 May 2026 10:32:46 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8edcc885cd3so49810585a.2 for ; Fri, 08 May 2026 03:32:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1778236366; x=1778841166; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=88KTNTZQBYZHxyZCHSKo558FfLLokQHJQxk8gQgi94s=; b=D43va9CYoyrGrUlJDN98ImOIOjlRASiZf/2OL1iCwZ6QU1GsTnPsfJU9i94r9EopeX 32PXmEuT2gNk3cGiBe0noUGQ6ixDSmirYY7k0E3ibdc1P8HPOcVbO3KhRhg+xfNaPbFe eeo0mCMOc5GcxqWwpsWbHeyaDhfHpHTLlLH/3UEB2wjh+GLE+hBwFid2Pw4XPYujJBrn b0W4ETU7ZbWiqmWYu0YvDusbQtzvF7jn9cCP2KRLy3sk1kozEOG9M6GgLgFzGIH1NabJ QBMFE0nXcgESdr2TGAZc6oHbEvnNbjcSbtxaJlmqUsEeHDnTgop2LjnqIOhdiDwWRRdZ tDVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778236366; x=1778841166; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=88KTNTZQBYZHxyZCHSKo558FfLLokQHJQxk8gQgi94s=; b=lW4nWluqzzEdVG7xBBUO0bsO/cCr5TaddvyQQt4M4i3TUHPFg8KpFQR1FwtgKm0LcT h1fHbnRhUtpLQRckDpHI/Wwtaa+NaDG4RghdKUl6PDSBvmCBQyrm0B9wTY7tz8XtvO8/ 7Je4ZY4WkqoOSpPU39f2AU1DiM2q9D78Kdf626n4HoE8/1U5qwT7QQ8fqolCMsLs4NVZ SJkOMsf+ZBkC1cbwS70mQI16pCIjh0RB1XwME31ZN1EMCKpIh8bLSIsVed8hbq2bWES3 teASNzg2Zf/gBuZCQLwtY+4ZMNp6P2v9QS87rB48d/WW+G5A8ozn72poelgzuyP1waku vv2A== X-Forwarded-Encrypted: i=1; AFNElJ+yzjAiWUIKQctbVUpliFTLAXj0VwuJSgasqpi0lXx4roeWsDuZovtBv/LCP5+XjHJmSk/3nRnSLqZp+U4=@vger.kernel.org X-Gm-Message-State: AOJu0YwUhuLc49y4iZMag8e/TSALez2AyFuR30BeWohlg+S5Pykf/PZi G96ORAaIb/jaPCfDkRGuLRS4MYIaRJVl0oAPsEo+rQasM1z2UKq1z+/qftE2YDpq6Jn2c3/8yu7 OHEg1P/RQxxTphkm8gE5HboXA99e5K9uSqehOAKdmB/NUZ9tuiwBG8U54Kjj38TcmteQ= X-Gm-Gg: AeBDieuWWg0EY4qXF283T0LY07wcjmlgbccy5LQXkDsZqYZgssEmdJiOz0aUU1aGc8Z 7okLzi8FkRC9n/7gTXRT5ivkr/juJlkXVlBIshCYV5VvcMTKYkYnGxY3F5hIhpTCHPlq0qOuJ+v nHtNjz/l1qZIzQ3IuxC/MGIe4PFUQcNuL0mhy1KMdIiOWSSQnN9T1QUPUqPdKBudlhEQbbzldN0 TZwXzr4PdugmyEqB19fO7QY/1l6X1zCbK9Rn1b+NWGryCBYzR+HnYZhSARFEzj5J7zLY0Uxcv7N AQ55tS584lxUaxN5cfHKyN69YjVkjwQIAD/ibYN+p1arWPxyFcVx0NSK39e5fIbfBt8HwtYLA4t 97mMVH6Inxy8UDmDjpxQZFPucWL3RxxfmlGCZ9peGrYhDt/kDlTkuU0qwnCSS5Recoox8o3Amk1 od9gI= X-Received: by 2002:a05:620a:469e:b0:8f8:6b36:fad3 with SMTP id af79cd13be357-904d78a863cmr1223117585a.8.1778236365737; Fri, 08 May 2026 03:32:45 -0700 (PDT) X-Received: by 2002:a05:620a:469e:b0:8f8:6b36:fad3 with SMTP id af79cd13be357-904d78a863cmr1223116085a.8.1778236365283; Fri, 08 May 2026 03:32:45 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-67ef0b3ba35sm509875a12.2.2026.05.08.03.32.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 08 May 2026 03:32:43 -0700 (PDT) Message-ID: Date: Fri, 8 May 2026 12:32:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2] of: property: Create devlink between PCI Host bridge and Root Port supplies To: Manivannan Sadhasivam , robh@kernel.org, saravanak@kernel.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, qiang.yu@oss.qualcomm.com, linux-arm-msm@vger.kernel.org, Bjorn Andersson References: <20260506075625.8490-1-manivannan.sadhasivam@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260506075625.8490-1-manivannan.sadhasivam@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNTA4MDEwOSBTYWx0ZWRfX17EJGIG+xTFm ni5bl4v9V+Yt3dhnLnJMlNCtTm/to4a9cHBt5bHKUr+RRa7ba8goz/lFqytmVDJIkPQl14A6XYt 0d/WamgNmAzDzxUnDx4QmmAjo1u+OSQzpRftP4V7vm1HxPpFUi03jxCbJbqbHo45im0bldAwvA9 eYAMBlEinbGKSmTipq85aMkW+kqA0GdEmnjuFhp6EKogwqYrvoiAN6HEnLa05J/6Om42e3w4LW3 hjfQNu6bW/I8ttoW/KoSIxTuusSG+zbyN/kh8IuO1GWPDIvkn9RwO0TK8Vxj4ZisF9fK4x/RBSp nOisabV3MoQ99VHAjTOepr7yV1sLjGAlmIjzPtYWtJRJLSbqS50Ajs71iSFdjdulJ6MMtO7iF63 L8Ml0UoB+1CB8w/KNP5g3tutBSFDV5sE4xLmK2hquPP3VnNe/X+k0a6DH2ArU5w2o/EO2WaTiPI 6b9aPeSWVsGnJCYqswQ== X-Proofpoint-ORIG-GUID: VCZfOB-NRPQt5NwSmGgdBzwmMQVF6lbs X-Proofpoint-GUID: VCZfOB-NRPQt5NwSmGgdBzwmMQVF6lbs X-Authority-Analysis: v=2.4 cv=Dd4nbPtW c=1 sm=1 tr=0 ts=69fdbbce cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=NGcC8JguVDcA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=8Pzyt-o0a4R5NFuvPhkA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-05-07_02,2026-05-06_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 clxscore=1015 adultscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 impostorscore=0 phishscore=0 priorityscore=1501 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2605080109 On 5/6/26 9:56 AM, Manivannan Sadhasivam wrote: > Recently, devicetree started to represent the PCI Host bridge supplies like > PHY in the Root Port nodes as seen in commit 38fcbfbd4207 > ("dt-bindings: PCI: qcom: Move PHY & reset GPIO to Root Port node"). But > the Host bridge drivers still control the Root Port supplies as a part of > their controller initialization/deinitialization sequence. > > So the Host bridge drivers end up parsing the Root Port supplies in their > probe() and control them. A downside to this approach is that the devlink > dependency between the suppliers and Host bridge is completely broken. Due > to this, the driver core probes the Host bridge drivers even if the > supplies are not ready, causing probe deferrals and setup teardowns in > Host bridge probe(). > > These probe deferrals sometime happen over 1000 times (as reported in Qcom > Glymur platform) leading to a waste of CPU resources and increase in boot > time. So to fix these unnecessary deferrals, create devlink between the > Host bridge and Root Port supplies in of_fwnode_add_links(). This will > allow the driver core to probe the Host bridge drivers only when all Root > Port supplies are available. > > Reported-by: Bjorn Andersson > Signed-off-by: Manivannan Sadhasivam > --- [...] > + /* > + * Since the host bridge drivers parse and control the Root Port > + * supplies, create a devlink between host bridge and Root Port > + * supplies. This will prevent the host bridge drivers from being > + * probed before the supplies become available. > + * > + * For checking the host bridge node, first ensure that it is a PCI node > + * and its parent is not a PCI node. Only host bridge nodes will have > + * this structure. > + */ > + if (of_node_is_type(con_np, "pci") && !of_node_is_type(con_np->parent, "pci")) { > + for_each_available_child_of_node_scoped(con_np, child) { > + if (of_node_is_type(child, "pci")) { Doesn't this go a level too deep now? (a change vs v1) for example, in x1e80100.dtsi: con_np = &pcie3_port0 con_np->parent = &pcie3 And I think the code now looks for device(such that device_type="pci") *under* &pcie3_port0 Konrad > + for_each_property_of_node(child, p) > + of_link_property(child, con_np, p->name); > + } > + } > + } > > return 0; > }