From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 E114C390229 for ; Fri, 13 Mar 2026 11:59:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773403193; cv=none; b=h3BaO9rS7xWaJcQlZGfNLMSjDV9bS1z1v7uU9VvU2wzyev6Tkcfdsa8boyB5nSyNiSGAXQ3nJqdL0ai49CvpA28iIeZnFBBSjri110Sdsl13Dn4/WmenefekskOm42ZpwibaA3CDa/cX4aWdvY0IAs8Hf/8MX6BstE5qSkjFHzI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773403193; c=relaxed/simple; bh=z0sVzBAcv13vC9l86gQlsXV87u5QGlJTtmJZRwdqpj4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=oGFhmrOU3SBPPtujTEMbt+iRprklNnUHNe5beBK9LrGJXrIaMGhDpm645gcYgBewXSDNXRg57uhOLlFIQbwo5bE3pIUd1Uef+xZbvKXCXNMxLR9V5QhmtY+Rn1FBMsNSFouVUqn/tgxMi8BlZRNLYDv2ygQqMZXAI8oZYljVAB4= 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=BtF5t7GB; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=PlmaDAl8; arc=none smtp.client-ip=205.220.168.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="BtF5t7GB"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="PlmaDAl8" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 62DA844c1749420 for ; Fri, 13 Mar 2026 11:59:51 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= dAPyYNhQ7Nilvok6h06J0gKQb9GOg5VVQtkr6R/ZE0I=; b=BtF5t7GBYwJUfunD K43XSiJjqXqPrGS9E8flXCr/CG5vIzZB66CCfxSHHBaYu0uwieMm12oxuvkNOvfn ja1fqd3U2vZCiW3Y2q84CzAew3ijeJVFVuXE8q02dxQeLmSC/U35nIun4/hmsow+ nJ+GO+Q1e83yw5oaj2VXlWSDhAIR+ibLLDcmtaDgISq5duMFyJCELzm4PVV4UY4B SV8LUlYila5uJookHMR4p4SvrL6NiWFc3JWjX0wSHLWFPXNJJIAK4BQlerda9t1B ZkjFryzFs6FJxSgd7s57853V0JBinDvp3wrKXg1lOh3G0zcuEbVTvDDA1BhnosAh AIyQAg== 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 4cvgj6ga6y-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 13 Mar 2026 11:59:51 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-8cb39de5c54so115181785a.0 for ; Fri, 13 Mar 2026 04:59:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1773403190; x=1774007990; 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=dAPyYNhQ7Nilvok6h06J0gKQb9GOg5VVQtkr6R/ZE0I=; b=PlmaDAl8vrOd2KP38BpdysJzWxfF+75kyVkAxGmJEHGPnKNRdH6k/G63rNmIKdIb3B kpqmfloClxBuLzhSuEBjE9mtlr5mgJN5F++0B7/j7Ze/2yl9eiLpPaXqQyIjLcy0LSXC //BO/Dcewl3WzuhdQa/yY4AcfatDnTOxKS2QyOXpHcU7102cULuIx/plhz6ovMx2gRxn D3RZMiQppcRnTY14InkrUrcoq0pg98sIiMZv8t4hQlez2+5ZIUA+3c8mfMHs3Yr9+IT5 NmHUaFcAP4hsM0IRUqlbDztR3wssT5K44vLRd8OSrQejJ4LM3pfKDVHKnkOzJy8NM/E1 uCkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773403190; x=1774007990; 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=dAPyYNhQ7Nilvok6h06J0gKQb9GOg5VVQtkr6R/ZE0I=; b=RT8x732Ax3461SzD4joO1m0yYLCU8NlinbG0KO1UHFjl31XkYiUqj2nfj+er6e8Dy1 0kTe3PbJ/VmQ3bg/4+iSRh6O3MWLduL52waPP4+710sRa7LFJSQCNQvNvuYkA7Cmf/VK BpIQNesEX78TT4wzviKQC/c1UmrWA6E0NyTiuP0yyEeyjtEtxciNFkB1GOeEJXiO/dCf tL8iUdEPEPuVb2+SlqwA1rhFr22WiIsdnBgnQpaWhhHNH4DdhQ685aHVnyi3TxN0c6On t+UjlPvIel9tjIiDEGoQZZq8isk0z42rpSIMicWU75meUvnS4vnCZQON9eC/0YuFH0h5 GYhQ== X-Forwarded-Encrypted: i=1; AJvYcCV4LLe635wY73c4qUJZgm/hGqW+xgmknSzSY0Pc79xQgrxIwNT3a6URl2n1+i9qk642ZywWev6d1PKw844=@vger.kernel.org X-Gm-Message-State: AOJu0YyVpvWUo66KW0GbHT94n6IYYcsmERwKdv4WX4ac98YI+aYsu+JS dl1eqNNyfbBzjcx06XZLTnnVDq6eGouWBr+2PXyFcBfApnL3q3hux3LKTFG+cQd9beBZX+2xYCS XZ1Iu+6dSlM7E5icilGs4zXTZ/j6//p4nNLcpQIm5FJZ7GOaBiyw2RZKoq506Qsk2Tfw= X-Gm-Gg: ATEYQzx77JPmCLdgRGpHQdQOMj3Ewg1kgygvfQ1B361LYLLr6DKssWKjqxJ/fcT6UYO CFa5uRvtt1J1Q7hIoZGzwjhO5cmDsPn0uFAzT3PxsniLGEmukLK4Xno89Sj7gDtuP9JvKd371t6 6u7LYGlHRon/dC6XrezLgPcAFAYIQ5/zFKmv3aFIDQADRNTPwq9ckG7aLpcgMkWBow4K8htjXkj WxOQB4y+IGv3utyvtCci1LKFXeU19ehbCk4fqijT72U6OXE+7A40oOlgrW6qvf725dCrtqB8a8a PXlDkTCFkQAoNlYiLQrI0hKD+c9gqAmqwj6WkI7KBg88IVQ6OeseG7sh/GaSBJojKDoxRsq4v+z 4G0d3oBlwumwKtKd4qELPQGvxrxWEhQieCFN7vapU/XY6ZhKII9IgAvv9bPuHx58ae2J8gRXQb5 QjDdk= X-Received: by 2002:a05:620a:1990:b0:8cb:3fa7:c4f0 with SMTP id af79cd13be357-8cdb5b42e6amr292517185a.5.1773403190155; Fri, 13 Mar 2026 04:59:50 -0700 (PDT) X-Received: by 2002:a05:620a:1990:b0:8cb:3fa7:c4f0 with SMTP id af79cd13be357-8cdb5b42e6amr292513185a.5.1773403189637; Fri, 13 Mar 2026 04:59:49 -0700 (PDT) Received: from [192.168.119.254] (078088045245.garwolin.vectranet.pl. [78.88.45.245]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b976cf49fa6sm39747866b.58.2026.03.13.04.59.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Mar 2026 04:59:48 -0700 (PDT) Message-ID: <90b3a7df-cd02-4878-b614-1499589f0906@oss.qualcomm.com> Date: Fri, 13 Mar 2026 12:59:46 +0100 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 1/5] arm64: dts: qcom: x1e80100: Remove interconnect from SCM device To: "Maulik Shah (mkshah)" , Dmitry Baryshkov Cc: Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Thomas Gleixner , Linus Walleij , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, Sneh Mankad References: <20260312-hamoa_pdc-v1-0-760c8593ce50@oss.qualcomm.com> <20260312-hamoa_pdc-v1-1-760c8593ce50@oss.qualcomm.com> <198ccf60-a4b9-438b-ad92-bc4d2cc84b83@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <198ccf60-a4b9-438b-ad92-bc4d2cc84b83@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMzEzMDA5NSBTYWx0ZWRfX42u70eqkgwhi kwWJ1GtZOPqjbn+g2Z9EAECwjfaFNhKPUwsCcj+sFBb6ZpVrZjtioX2XtlWUDAuxRvh5TaZrJ0t wHxtLdPsGHk2YsoMqsLIE62XiaXKuMnYbKnm+xwUel/jWuJ4yZELjTUpopXe/AKdX8LkVXoFqzn ePouJYrzEly3AmLAq2Gy8xopF9hZV5ddEyGYY1SO+DQufekPWMPjFjhsRJ+HxRBgOqFAHiTa3Xu AEGzlYOfrnyV7Bu/Y6t9+8h4o7AcO80JMkOGPG5PzZv0CkT10FAw5hakmAnmWf5MbacNMnLLb6S VG20x8bZoDi2SmEcx0mzaIumK3CRTDu/l9oHM/Fac9SjmK17RylXAtv7OrZmew5wgnF+kYfa/uw 2kfigcZCNvFKKw8trDyjBUxAUuQZ03bwY57WWvWwbYUG+hqYML69/JUCnKl1xzRC5WJHHmyrHRD RUj8HkLYm1BOWCpvqug== X-Proofpoint-GUID: _cInPF4J_mEZ6ESaSUX3-3Cxf3g25CvY X-Proofpoint-ORIG-GUID: _cInPF4J_mEZ6ESaSUX3-3Cxf3g25CvY X-Authority-Analysis: v=2.4 cv=H+vWAuYi c=1 sm=1 tr=0 ts=69b3fc37 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=FpWmc02/iXfjRdCD7H54yg==:17 a=IkcTkHD0fZMA:10 a=Yq5XynenixoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=D3rGKGdzeZ1DfF1dGIIA: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-03-13_02,2026-03-13_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 malwarescore=0 adultscore=0 impostorscore=0 priorityscore=1501 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2603130095 On 3/13/26 11:12 AM, Maulik Shah (mkshah) wrote: > > > On 3/13/2026 7:41 AM, Dmitry Baryshkov wrote: >> On Thu, Mar 12, 2026 at 09:26:35PM +0530, Maulik Shah wrote: >>> Interconnect from SCM device are optional and were added to get >>> additional performance benefit. These nodes however delays the >>> SCM firmware device probe due to dependency on interconnect and >>> results in NULL pointer dereference for the users of SCM device >>> driver APIs, such as PDC driver. >> >> This sounds like a bug in the PDC driver. It should reject being probed >> before SCM is available. > > The SCM driver provides no way to check if its ready or not to decide to reject/defer the probe. > A new API like below would be needed here, There is, qcom_scm_is_available() > Let me know any preferences from below options or any other. > > a) Add the API like qcom_scm_ready(), this has been tested and works fine. > b) Move interconnects from SCM to remoteproc PAS driver for all devices > Take the vote before invoking SCM API and release after return. I think this is not the right decision. The crypto path is only necessary, because cryptographic checks must be carried out in the TZ in order to (dis)allow a certain firmware binary. This is not a characteristic of the remoteprocs themselves, as with a non-prudent TZ, the firmware loading would amount to a memcpy() (and some SMMU/XPU configs via reg writes) > c) Remove the interconnects from SCM and rely on crypto driver already > placing the vote, Route the remote proc to SCM call via crypto API, > This would ensure crpyto is being used and it would have placed the required vote. I think this would make things even worse, because instead of waiting on the interconnect driver, we'd now have to wait on the interconnect driver, the clock driver and the crypto driver > d) Add separate SCM child device (with interconnects) under SoC. We'd then have to probe it as an aux device or something, which would either delay the probing of SCM, or introduce the need to ping-pong for PAS availability between the API provider and consumer, since some calls work perfectly fine without the ICC path, while others could really use it Konrad