From nobody Tue Oct 7 01:59:23 2025 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 76E2A274672; Tue, 15 Jul 2025 08:53:13 +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=1752569594; cv=none; b=bqPJk2NF2o9xtj8Ju2jLdT5se+L6L0qKmhW9tfquf6H5sCw+E9TFCDUgBBvZZzTjfFCRxasScJEc/azanF981QkQeV0gUMcbMen/pkHfxjVUxi6kplLgBwgIZlqcVYWPIPaz/3OKqdesBhh0rCsgtiFVubExOfQFtf68oZhsk5E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752569594; c=relaxed/simple; bh=m69eBpowmMuNvTB6Apw+JQZp8W3Cx09oDdHKlO4Ttzk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=SyJtIvpmYELfVeM+HkB2w5Mz5URn2xGchUSRfK6KpF1XzrvcZ6F+GWLk2jkvEt8tI33eynNkBp5GEbaArLhFIud6QDx2OplZO5gada6bWUGW6cub1oil5jozV48LH/qV3l3rZxCQ8cPb7ShPwH9GyS+dKy7CICmDKlV54uCm6KY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Uo55ei8x; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Uo55ei8x" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56F8ksaQ027658; Tue, 15 Jul 2025 08:53:01 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 4AliyRKzkx1UpYngLzabBdK8VVN1l5cX3s5tZAsft8Y=; b=Uo55ei8x77iyDmHR cKnLRPvxVR+Jx2vPMNVhaK8/ibJPHZ9ahSAOs3opnrwnHBzIe+fx90xN1vEWHsQB avCKYmc9KVqkXoHbW3BnW8+HxI6FcqLw6R0CrPhTIb50zZH02iBuC3q7+u4xdmEU 5mnRe7QeVU0h53WKE6VKDME0O/4MzdlPkzLOJwWEUOC2Fh5vX/zBlDnh0mT9QYvS h3yCWb8G4W4B3H3jnEp7gRs2pN3fzfdCNPnCt7e9CI5ERAe8jZNOcpP/ZcEKYdZu dxcNJwD/p6IbOCP+rIN3qqosmpVh1YKRqNaVzsyt91PuUuEBmn1Z8FBXVB8nPo1Z +B7Tng== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47wkrug0ty-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:01 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56F8r0f9017513 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:00 GMT Received: from hu-lxu5-sha.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 15 Jul 2025 01:52:56 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Krzysztof Kozlowski Subject: [PATCH v8 1/5] dt-bindings: misc: qcom,fastrpc: Add GDSP label Date: Tue, 15 Jul 2025 14:22:23 +0530 Message-ID: <20250715085227.224661-2-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250715085227.224661-1-quic_lxu5@quicinc.com> References: <20250715085227.224661-1-quic_lxu5@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 4-IeGZQHoy1N3R8-O0TEg0rg49txDRzU X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE1MDA3OSBTYWx0ZWRfXwh/t+dXwnscT 1wbmDjDA8gDA5Q+/U8qTGDrs9I0/zzzLBgC035YDvXeqjgajqpJZ1DSkw4gw7hn7Rd9cmxdM1gT mLEbhOokRbq9mGXQlUZRgQ6erdg0iwWKvBMACmxOUzk1fZJDQOdkR0faVlvhKvAhaPazraKfEhS FqRjZsGXeQZ704HuyZdw2Y41BqTk8Mo3VSkYV227clhLz3jI83cN+MLfaMArPg+uafoqvUygYBX 9H1F77gXsXRrO/Mn32Mt32zklXgSNzySXqUe1y6zjTrPv6FULyIS2pvTz5Lx1NsO0L2V5CSdogH 6OgNUbm9V66iOUyeyGYdbmJBYxVG5jI/+dHlK42wXztvHUTWTRpbpwup/lS/ylTtou38gVEToYa KsSu6wxlFy+A2WIEr/jdWineHzNoPMbw4Lk8yhX3cOwyExNRliamMxAQ9Ft/+sfq0tDrOgxG X-Authority-Analysis: v=2.4 cv=WqUrMcfv c=1 sm=1 tr=0 ts=687616ed cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=KKAkSRfTAAAA:8 a=COk6AnOGAAAA:8 a=y9j2seIhk4up1NT0-iEA:9 a=cvBusfyB2V15izCimMoJ:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: 4-IeGZQHoy1N3R8-O0TEg0rg49txDRzU X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-14_03,2025-07-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507150079 Content-Type: text/plain; charset="utf-8" There are some products which support GDSP remoteprocs. GDSP is General Purpose DSP where tasks can be offloaded. There are 2 GDSPs named gdsp0 and gdsp1. Add "gdsp0" and "gdsp1" as the new supported labels for GDSP fastrpc domains. Acked-by: Krzysztof Kozlowski Signed-off-by: Ling Xu --- Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Doc= umentation/devicetree/bindings/misc/qcom,fastrpc.yaml index 0840a3d92513..3f6199fc9ae6 100644 --- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml @@ -27,6 +27,8 @@ properties: - sdsp - cdsp - cdsp1 + - gdsp0 + - gdsp1 =20 memory-region: maxItems: 1 --=20 2.34.1 From nobody Tue Oct 7 01:59:23 2025 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 760692D46DD; Tue, 15 Jul 2025 08:53:16 +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=1752569597; cv=none; b=efGhZ5XYYHFcRZCb6CEALpwJDZt8vV9eOEw7z0eDaSVudDG3zkzNlgS8jBd9nQaTpKjH9GeMo2BJuw5f26jfkEvw/Mg43zFH7/Y2yFnr5f6+tyJzv5msbFgEJTp19YT1bW1U2QRD6OlceLIHWcRWqrzAB9vXMtBkDc3gPBeSkNU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752569597; c=relaxed/simple; bh=uVR1Ztg+lo0CfsukEJRg3CHLYxSDrvFZdpni4JXKNZk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=i+RF+I5r01drVKjmJP+ve6Nucx2P+pkMOYuSYsJPyf5gHBRZ2+PN9Fvvu5kon/w3MpuLBcfSz9pAd/GTPuyVcCJH6So/yHYSU+siejZjcbrzhaMNOLMwn1IeyN4p+gclqP06oXUSfrb0Hx1HWNiiLAdF2kLnTfJ5pZN1X+6pt08= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=SaVQyRjv; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="SaVQyRjv" Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56F5qrHg012419; Tue, 15 Jul 2025 08:53:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= pjoy9L+s2OuHVxCsEkIMiscMS7VR/zKPd39K+Z+YfQg=; b=SaVQyRjvUj7eAWMI s/kBAoNyzM4PeKit+RGyAhULpJV0H3K4neLWhCJV+AG/p8PRR8foKHX+dSpcDhQt hJ3ExHzF9KpgDAGaJWF2dzXjo7bFyfAsehBQJMJ7JlGBdPBN2Hl2zJ68y5u/lpNc nz2HUb1gXSm/bcXYr2VBGHmkwSqqdj+WZlfE44kwkpzXqvdyjZzz0LZ+MOGHqaqB jl1adlWfABoIm3DXfl7eDSEl0WVipxU1UwxgPc0qR7uvtluU00WGhfVANI7fHim7 iugfnxbgOFLu7FlNw5Aja/xuC9WZ5qO6Q55sySz2kDwjjsFtmJOeruy55IOYsWle urHAnw== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47w5dyj9e2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:05 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56F8r5YR027390 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:05 GMT Received: from hu-lxu5-sha.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 15 Jul 2025 01:53:01 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Dmitry Baryshkov , Konrad Dybcio Subject: [PATCH v8 2/5] arm64: dts: qcom: sa8775p: add GDSP fastrpc-compute-cb nodes Date: Tue, 15 Jul 2025 14:22:24 +0530 Message-ID: <20250715085227.224661-3-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250715085227.224661-1-quic_lxu5@quicinc.com> References: <20250715085227.224661-1-quic_lxu5@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: UkYLE5ZI7JSyzOzHzEyNr8bYboA7CF6g X-Authority-Analysis: v=2.4 cv=RtXFLDmK c=1 sm=1 tr=0 ts=687616f1 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=EUspDBNiAAAA:8 a=COk6AnOGAAAA:8 a=CfRyy-KmkZQ3OiQjKWoA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE1MDA3OSBTYWx0ZWRfX1GaVTQ8tJ+3+ CxIHRROG/4RuJ7Kn7OozzWmitzNIlMEuOlenIIWvzwAxiaTvMDcRUqP+wyT2Bsy6DYjSF1zccSP ZQ96qgrrHcKS5VZX3A82V92ghkGSII+Eb7tahNafLrn6iYFwGcVDMXLLTJ5PUCKgj2ytx0J904Q Bp4XPBFqVvwsV8p1MHxNdA8ogPgpuwYeJjzrvl6bn2YISuT7TX2Z8mw46zHJEuf7hsTguwjSFCQ 2/MXVetMreuo0WLXrkihH94FWaWl/5/qw7lTniM3+ucE8+R7ywZP3V3mcc74q7xJO0+LI6g72L4 cy/WhYWMIN49Nvdh/i5z4kqG9QxFa1ltVRfx0fdZCI6AMtCgjJNbAWmA0VzbvsJzB+4SyejxrjT +wiR8FgMYcv3aYHPkwUwBm9xYqlHeetfEQUaBkbXxQGoydULlNvrRGaGNjNKJKXXbvlyz/Uk X-Proofpoint-GUID: UkYLE5ZI7JSyzOzHzEyNr8bYboA7CF6g X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-14_03,2025-07-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxscore=0 bulkscore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 malwarescore=0 clxscore=1015 mlxlogscore=862 priorityscore=1501 phishscore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507150079 Content-Type: text/plain; charset="utf-8" Add GDSP0 and GDSP1 fastrpc compute-cb nodes for sa8775p SoC. Reviewed-by: Dmitry Baryshkov Reviewed-by: Konrad Dybcio Signed-off-by: Ling Xu --- arch/arm64/boot/dts/qcom/sa8775p.dtsi | 57 +++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sa8775p.dtsi b/arch/arm64/boot/dts/qc= om/sa8775p.dtsi index fed34717460f..5ebc058931ad 100644 --- a/arch/arm64/boot/dts/qcom/sa8775p.dtsi +++ b/arch/arm64/boot/dts/qcom/sa8775p.dtsi @@ -6080,6 +6080,34 @@ IPCC_MPROC_SIGNAL_GLINK_QMP =20 label =3D "gpdsp0"; qcom,remote-pid =3D <17>; + + fastrpc { + compatible =3D "qcom,fastrpc"; + qcom,glink-channels =3D "fastrpcglink-apps-dsp"; + label =3D "gdsp0"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + compute-cb@1 { + compatible =3D "qcom,fastrpc-compute-cb"; + reg =3D <1>; + iommus =3D <&apps_smmu 0x38a1 0x0>; + dma-coherent; + }; + + compute-cb@2 { + compatible =3D "qcom,fastrpc-compute-cb"; + reg =3D <2>; + iommus =3D <&apps_smmu 0x38a2 0x0>; + dma-coherent; + }; + compute-cb@3 { + compatible =3D "qcom,fastrpc-compute-cb"; + reg =3D <3>; + iommus =3D <&apps_smmu 0x38a3 0x0>; + dma-coherent; + }; + }; }; }; =20 @@ -6123,6 +6151,35 @@ IPCC_MPROC_SIGNAL_GLINK_QMP =20 label =3D "gpdsp1"; qcom,remote-pid =3D <18>; + + fastrpc { + compatible =3D "qcom,fastrpc"; + qcom,glink-channels =3D "fastrpcglink-apps-dsp"; + label =3D "gdsp1"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + compute-cb@1 { + compatible =3D "qcom,fastrpc-compute-cb"; + reg =3D <1>; + iommus =3D <&apps_smmu 0x38c1 0x0>; + dma-coherent; + }; + + compute-cb@2 { + compatible =3D "qcom,fastrpc-compute-cb"; + reg =3D <2>; + iommus =3D <&apps_smmu 0x38c2 0x0>; + dma-coherent; + }; + + compute-cb@3 { + compatible =3D "qcom,fastrpc-compute-cb"; + reg =3D <3>; + iommus =3D <&apps_smmu 0x38c3 0x0>; + dma-coherent; + }; + }; }; }; =20 --=20 2.34.1 From nobody Tue Oct 7 01:59:23 2025 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 EF5B61917F0; Tue, 15 Jul 2025 08:53:16 +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=1752569598; cv=none; b=DvhJQ73iExdOmtDGM7Tjdoy4nTBNjkHCSjpOtjErCs6OV+Oio4wxyRb7lfCsUqoT+5dqWVx/fqzcYxV5Pr6mHOIJ3iGbwgBIKkgfGwWVWV5/kEDic7bM7mDJOhSwdZjpPgptWAZPCyl20inDg6gTGxsgpx9fjs1SPbJGyGux/m4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752569598; c=relaxed/simple; bh=v8mrY67QFyveFi1ZZWQloKjL1arCdfRqJXxoqmDbFeE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=B74qRWzo0n/7UKtphj4t7iotrRyQ082MhlNrNNLWmVkgNdz/2BcpyyY5LRyKjoEajyL94FdrTZ9S0So+Fm8EM0Kozs35pO2db8J7v4JwcPfzZ0XPg7nrC6YjOCc6hrcgVKYWnOPRY5mbOI+GTG4r4qEcoy2kAa8fXrGmwbhw5VM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=HB90+lCo; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="HB90+lCo" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56F7sB4S015241; Tue, 15 Jul 2025 08:53:10 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 9m+ZjqvaLBMxW2VhgG08kToN5ia5OfhliX3Ba/2bA6A=; b=HB90+lCoC+ce9RnL zJgmGLYF/5baNni/u3foHSn77wQqIHVthXkR8uXXwzBqnBp6bVPDbEzjhumkBvjU z6cRw+vbV/xHxGIZkNli4qULAdrRYNmSckJMqlvwYV7wNS4yciY16FRHoH7B1Mo9 PIty+Vf1HFTBWpI6g4PRNWyFsZVUbMa7t+kSsLHgms14ucVu3DErK5luwLdPIjP8 pTMtgQsZM9tqYRVj5qHHUYoKtkcMTgjXAPFGAN/iqpNH9xaNSOn6folZK2PeiYce R9PF7fmqu+LehICf/1nA/TaWIWPcE7YlRA6ef02dBm9EN/hQA117fvLRmKyeTYeK BJCNDA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47ufu87f2v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:10 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56F8r9kq028398 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:09 GMT Received: from hu-lxu5-sha.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 15 Jul 2025 01:53:05 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Srinivas Kandagatla Subject: [PATCH v8 3/5] misc: fastrpc: Cleanup the domain names Date: Tue, 15 Jul 2025 14:22:25 +0530 Message-ID: <20250715085227.224661-4-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250715085227.224661-1-quic_lxu5@quicinc.com> References: <20250715085227.224661-1-quic_lxu5@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE1MDA3OSBTYWx0ZWRfX3WYmZ/4hHieX NI4PJMupF848uYPsHp8z9jo9pVzYAgSY6NO/ZJ0zVO8/b8HbJQisIXZRmU/n2omvmL3qtCPFy6n sqqtl80FgglwX4OCgg7OF/X8fXbq3bBJwJ2WDzCBseFI1bsVtG+SzGEhlpMVl3p+/5JmLu3+ljl 07OB8ZejJNLUkhJD+DaGQ+1jLJDHcYuIc95cGq4Dy+OIOu/m3LNPPRndsFffi1TuoTv2elmbuiP T4VFzu3LYB0B5ApjdejwFenLy26fnGvPzWMkk7KNmJ70ZS1hoarSnInm5lNZ4rwS3JIeCEzpS9u Eq5EQtdV9/n2DrmU5yO9wTI++S8PnQ1NM1d3fT2HQjnvmVYIhWzYI/AuGvHetQvr2ppT7xIXp9D TFS3zJ4VyqeodWb9z61aO6ARhpdR7dpBAnesIw249+T0jnSxLaFEJABqQvLMYIebvMkdSg4c X-Proofpoint-ORIG-GUID: m5XTOmi5D5hvRw3W1XVDkTjyQScTcVT_ X-Proofpoint-GUID: m5XTOmi5D5hvRw3W1XVDkTjyQScTcVT_ X-Authority-Analysis: v=2.4 cv=f59IBPyM c=1 sm=1 tr=0 ts=687616f6 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=KKAkSRfTAAAA:8 a=COk6AnOGAAAA:8 a=rtsugCAgaeCb0McjE8wA:9 a=cvBusfyB2V15izCimMoJ:22 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-14_03,2025-07-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 spamscore=0 mlxscore=0 bulkscore=0 suspectscore=0 impostorscore=0 adultscore=0 priorityscore=1501 mlxlogscore=999 phishscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507150079 Content-Type: text/plain; charset="utf-8" Currently the domain ids are added for each instance of domains, this is totally not scalable approach. Clean this mess and create domain ids for only domains not its instances. Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Signed-off-by: Ling Xu --- drivers/misc/fastrpc.c | 39 ++++++++++++++++++++++----------------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 378923594f02..083c1bccc467 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -27,8 +27,7 @@ #define MDSP_DOMAIN_ID (1) #define SDSP_DOMAIN_ID (2) #define CDSP_DOMAIN_ID (3) -#define CDSP1_DOMAIN_ID (4) -#define FASTRPC_DEV_MAX 5 /* adsp, mdsp, slpi, cdsp, cdsp1 */ +#define FASTRPC_DOMAIN_MAX 4 /* adsp, mdsp, slpi, cdsp */ #define FASTRPC_MAX_SESSIONS 14 #define FASTRPC_MAX_VMIDS 16 #define FASTRPC_ALIGN 128 @@ -106,8 +105,6 @@ =20 #define miscdev_to_fdevice(d) container_of(d, struct fastrpc_device, miscd= ev) =20 -static const char *domains[FASTRPC_DEV_MAX] =3D { "adsp", "mdsp", - "sdsp", "cdsp", "cdsp1" }; struct fastrpc_phy_page { u64 addr; /* physical address */ u64 size; /* size of contiguous region */ @@ -1769,7 +1766,7 @@ static int fastrpc_get_dsp_info(struct fastrpc_user *= fl, char __user *argp) return -EFAULT; =20 cap.capability =3D 0; - if (cap.domain >=3D FASTRPC_DEV_MAX) { + if (cap.domain >=3D FASTRPC_DOMAIN_MAX) { dev_err(&fl->cctx->rpdev->dev, "Error: Invalid domain id:%d, err:%d\n", cap.domain, err); return -ECHRNG; @@ -2255,6 +2252,20 @@ static int fastrpc_device_register(struct device *de= v, struct fastrpc_channel_ct return err; } =20 +static int fastrpc_get_domain_id(const char *domain) +{ + if (!strncmp(domain, "adsp", 4)) + return ADSP_DOMAIN_ID; + else if (!strncmp(domain, "cdsp", 4)) + return CDSP_DOMAIN_ID; + else if (!strncmp(domain, "mdsp", 4)) + return MDSP_DOMAIN_ID; + else if (!strncmp(domain, "sdsp", 4)) + return SDSP_DOMAIN_ID; + + return -EINVAL; +} + static int fastrpc_rpmsg_probe(struct rpmsg_device *rpdev) { struct device *rdev =3D &rpdev->dev; @@ -2272,15 +2283,10 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device = *rpdev) return err; } =20 - for (i =3D 0; i < FASTRPC_DEV_MAX; i++) { - if (!strcmp(domains[i], domain)) { - domain_id =3D i; - break; - } - } + domain_id =3D fastrpc_get_domain_id(domain); =20 if (domain_id < 0) { - dev_info(rdev, "FastRPC Invalid Domain ID %d\n", domain_id); + dev_info(rdev, "FastRPC Domain %s not supported\n", domain); return -EINVAL; } =20 @@ -2330,21 +2336,20 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device = *rpdev) case ADSP_DOMAIN_ID: case MDSP_DOMAIN_ID: case SDSP_DOMAIN_ID: - /* Unsigned PD offloading is only supported on CDSP and CDSP1 */ + /* Unsigned PD offloading is only supported on CDSP */ data->unsigned_support =3D false; - err =3D fastrpc_device_register(rdev, data, secure_dsp, domains[domain_i= d]); + err =3D fastrpc_device_register(rdev, data, secure_dsp, domain); if (err) goto err_free_data; break; case CDSP_DOMAIN_ID: - case CDSP1_DOMAIN_ID: data->unsigned_support =3D true; /* Create both device nodes so that we can allow both Signed and Unsigne= d PD */ - err =3D fastrpc_device_register(rdev, data, true, domains[domain_id]); + err =3D fastrpc_device_register(rdev, data, true, domain); if (err) goto err_free_data; =20 - err =3D fastrpc_device_register(rdev, data, false, domains[domain_id]); + err =3D fastrpc_device_register(rdev, data, false, domain); if (err) goto err_deregister_fdev; break; --=20 2.34.1 From nobody Tue Oct 7 01:59:23 2025 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 BFF9A2D63ED; Tue, 15 Jul 2025 08:53:21 +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=1752569603; cv=none; b=sQAXDWhTkbI0Fla9iniLK7xBQQIUL+BtNd0Lnh9v1qifXdaZx+prk5pOujnLPSAIoCGR1ughZ6JvoIUb+sPk9UBsA1bwU1qjkrEiB/x/GYmPNyiRPlj5K1VjIMkbq3b3G8Yk4tqutNG3KdiVxyQETHT0g+0/TdbwEqyldwNSQW0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752569603; c=relaxed/simple; bh=wh3aZH7JHjf56fWSZDNnzPpfLSa9SIptWDYI1qpnE6I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=c1wa5z570ZTfGg9NNm9WTfkxlr6T9nqGdcFGBk3pkJutUNZoWGFB8fO1LHpRcDaql5u+18OYqNeh6wyFnpMu8nk/JSikIwAkM/zIyQigdHMLJV1P9HFVGHhYV/pIauNN9HjOclvHN3RGTyMgMyaMijUDA8PZ38quIgnyw0MsOxc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=KNvMzGSM; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="KNvMzGSM" Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56F681lN000723; Tue, 15 Jul 2025 08:53:16 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= PmLT0fEksY/hu/qFDbYMSR9Tr86pZZtMwBoeWEsgmNo=; b=KNvMzGSM5w502Bqe iWKk3WaaImboOPuQcC1gd0gbt/YNfsZvpinMqQsVSBLhiW4Hl1ro59fnvWKc8cna BXCsOvDxLZgwbNK/g6H/8rxabrfVjGpikMNFeH89TA7CdUI4RDMfqxQxNalte2lq YSgj16cZA2MKKHOUWvWe/AUENjoA56bym8lTlYDWbOUfFf9pec/TycUsYO/0PMjK NqZeUhH1YX2FDrXUZmXTpez2SDETyDSHqOwaEAYyu5ieMovfBiO2rbWPVbNWkoEq jGWAtgBeUK7CSS2u2eDore9jHhbaQe6l+jUKjskOWwBg+ZG3/AVj2HhUEMtegxnh ICzBTA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47ugvmyuvg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:16 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56F8rFtN019358 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:15 GMT Received: from hu-lxu5-sha.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 15 Jul 2025 01:53:12 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu Subject: [PATCH v8 4/5] misc: fastrpc: Remove kernel-side domain checks from capability ioctl Date: Tue, 15 Jul 2025 14:22:26 +0530 Message-ID: <20250715085227.224661-5-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250715085227.224661-1-quic_lxu5@quicinc.com> References: <20250715085227.224661-1-quic_lxu5@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: n-3KWSv5chLlpGmk-H3eNWk358KycNrv X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE1MDA3OSBTYWx0ZWRfX0Hv8XHhh8ITo X5yf+5RwuyMemaqLQUSDXubiimMGA0lO7OaOCF7H4TRU1Q5I4D7okhyJW7G2A16oPGkCJxuX6BT q71LgKfW1Oy2SFsC4BGCWh/ofvgBV2i24teF++E/BscvYizd869fp9tHwR5SIX8ZWCOh4IHVCXi BFtDUF2JbNtCGhSHTsPhpa3WIvq86u5c1GjHPb2rM/Uaco5IQb1FHsVO7zGBx/dv10TVq6IYk1O bHgEHteTnLIgXuFa280BqS4Xvqhd1qUVBjJe6MiYDLRsgvDqeadzb0ryAq6qu4Q6i7QpkxLV2K5 DQXxT4ntAxkiobUpJqcP36bUbtJL6PhpbFFfWqA9zUxoyvV3kUVI0VQ8iRrf20puAP6jvZoaYOT UDHkMXQwvfjpLm4bjj9Q+mavoALHTCw/Czfhgnr88+FYUtWhCjEgvDLIfK5fXiGnetPP7BJy X-Proofpoint-ORIG-GUID: n-3KWSv5chLlpGmk-H3eNWk358KycNrv X-Authority-Analysis: v=2.4 cv=C4fpyRP+ c=1 sm=1 tr=0 ts=687616fc cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=AVwB9L8OO_vht6zXYJ0A:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-14_03,2025-07-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 priorityscore=1501 mlxscore=0 suspectscore=0 phishscore=0 clxscore=1015 lowpriorityscore=0 spamscore=0 malwarescore=0 bulkscore=0 impostorscore=0 mlxlogscore=999 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507150079 Content-Type: text/plain; charset="utf-8" Now domain ids are added for domains, which is different from userspace. Remove checks and log messages related to 'domain' field in capability structure. Update UAPI to mark the field as unused. Signed-off-by: Ling Xu --- drivers/misc/fastrpc.c | 15 +-------------- include/uapi/misc/fastrpc.h | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 083c1bccc467..85b6eb16b616 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -27,7 +27,6 @@ #define MDSP_DOMAIN_ID (1) #define SDSP_DOMAIN_ID (2) #define CDSP_DOMAIN_ID (3) -#define FASTRPC_DOMAIN_MAX 4 /* adsp, mdsp, slpi, cdsp */ #define FASTRPC_MAX_SESSIONS 14 #define FASTRPC_MAX_VMIDS 16 #define FASTRPC_ALIGN 128 @@ -1720,7 +1719,6 @@ static int fastrpc_get_info_from_kernel(struct fastrp= c_ioctl_capability *cap, uint32_t attribute_id =3D cap->attribute_id; uint32_t *dsp_attributes; unsigned long flags; - uint32_t domain =3D cap->domain; int err; =20 spin_lock_irqsave(&cctx->lock, flags); @@ -1738,7 +1736,7 @@ static int fastrpc_get_info_from_kernel(struct fastrp= c_ioctl_capability *cap, err =3D fastrpc_get_info_from_dsp(fl, dsp_attributes, FASTRPC_MAX_DSP_ATT= RIBUTES); if (err =3D=3D DSP_UNSUPPORTED_API) { dev_info(&cctx->rpdev->dev, - "Warning: DSP capabilities not supported on domain: %d\n", domain); + "Warning: DSP capabilities not supported\n"); kfree(dsp_attributes); return -EOPNOTSUPP; } else if (err) { @@ -1766,17 +1764,6 @@ static int fastrpc_get_dsp_info(struct fastrpc_user = *fl, char __user *argp) return -EFAULT; =20 cap.capability =3D 0; - if (cap.domain >=3D FASTRPC_DOMAIN_MAX) { - dev_err(&fl->cctx->rpdev->dev, "Error: Invalid domain id:%d, err:%d\n", - cap.domain, err); - return -ECHRNG; - } - - /* Fastrpc Capablities does not support modem domain */ - if (cap.domain =3D=3D MDSP_DOMAIN_ID) { - dev_err(&fl->cctx->rpdev->dev, "Error: modem not supported %d\n", err); - return -ECHRNG; - } =20 if (cap.attribute_id >=3D FASTRPC_MAX_DSP_ATTRIBUTES) { dev_err(&fl->cctx->rpdev->dev, "Error: invalid attribute: %d, err: %d\n", diff --git a/include/uapi/misc/fastrpc.h b/include/uapi/misc/fastrpc.h index f33d914d8f46..c6e2925f47e6 100644 --- a/include/uapi/misc/fastrpc.h +++ b/include/uapi/misc/fastrpc.h @@ -134,7 +134,7 @@ struct fastrpc_mem_unmap { }; =20 struct fastrpc_ioctl_capability { - __u32 domain; + __u32 unused; /* deprecated, ignored by the kernel */ __u32 attribute_id; __u32 capability; /* dsp capability */ __u32 reserved[4]; --=20 2.34.1 From nobody Tue Oct 7 01:59:23 2025 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 B78D22D6402; Tue, 15 Jul 2025 08:53:25 +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=1752569607; cv=none; b=aKIdNRLrNNjAtDdaR90g30a0CQsesz+0YxSJJqkUrPsHrU/moHoqkE9Q/vMeVZfztRfNagN2zkPl23yZo2ZtTZvDY3KjI21ef2TFKFpLTCl+PRcX+4seb9ag29Blb/+XdZPZlsQhjgny/GEsTdP1bMX7qiEfcl5T4PUn4AUiZIY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752569607; c=relaxed/simple; bh=dLeLI6Z4FjKwIOWMA2g0zWgg/TP0SnyZNeM+LjQEqgI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OWOXi4XFEa/NHJJx7mzB+6v1Z59vBQo3EqXcEeOil0PjoTtYvRPkjr+Aq0p8+35/tfCxZgdE7SWFgB5JNs3St4s/+yGoIEoyFD38wLFDvnLYjVTPTPlSOoLZp+yq0ZmVOK6wh9zSx0Ld7IWFQHKHuiTNS14sB94c8NSZvZKaJCY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=FLZGuVja; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="FLZGuVja" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56F8kHnw026550; Tue, 15 Jul 2025 08:53:21 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= GPIGQmV+hqdlsR9ccAm6wBh1uGhtNO9pveoOBdEfVX0=; b=FLZGuVjaGlhxgDV0 Km2kX9Eynk7Dv40bS598RmxsFOrrG+vrJSJlBTivIA+F8A8GZ81+FZScyBK3xvpe 0hvnWiVMASSBAQJrQ8APyS+TqA00pXimVQ2S5r5LesKNwp/aYOqkFtJibwHupeOF IgbeZ+ES+tWDdee3gY6greJxIbQIWGB9Xw4CBjC37onQG5i9R+qYJk2XvhW0CdlC JOgYIFijRE5rNmL1s8s3/BQjaU3QGH9DJaH+GPJNLtPyJQIDz1H9Au080682TrdB Y+8pzg1fuv03yM+eLbBNsrOQYfk4EfxzRXQOxK76DlGM2fYas9g6eLXvDbc8Qypp gAREqQ== Received: from nasanppmta03.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47wkrug0vm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:20 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56F8rK0F013103 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 15 Jul 2025 08:53:20 GMT Received: from hu-lxu5-sha.qualcomm.com (10.80.80.8) by nasanex01c.na.qualcomm.com (10.45.79.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Tue, 15 Jul 2025 01:53:16 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Dmitry Baryshkov Subject: [PATCH v8 5/5] misc: fastrpc: add support for gdsp remoteproc Date: Tue, 15 Jul 2025 14:22:27 +0530 Message-ID: <20250715085227.224661-6-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250715085227.224661-1-quic_lxu5@quicinc.com> References: <20250715085227.224661-1-quic_lxu5@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01c.na.qualcomm.com (10.45.79.139) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: Pdnk5SgZuNlATzv0Pg5IlhS5aFUvLsF2 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE1MDA3OSBTYWx0ZWRfX3/w4NcOhBpGH CHvQLnWROLV0o/WA6kq3WXgdNzl22v1bN87k/Qreq8iOpQtNJVokSoGeUg6ZH0tOi9khc53JRWb KxnuiRlJfFj95UIg1DDTeWQ1V5rEg8tgj8q3ZbIGzOL5WZAbOptcS/xmH4pSvvcr9FevwhnslBv hgAYYceZdnkhAeBywxMehfEd2XoXmX1dvO6NyEHCLcB9Pq3AFMBaE+YI5fR/Ifh2qlA5sIY6WEk KFlgW7S4IOpJ+5EbjtZ9+4ZiOesQz1mXTu7i3AOLC4P0sR1dXD+iRjZ0JeGU6aKyLRcWoHf+M9Y 50kEYzvxh4F1TA6fAlz4mbFTu7dYt+AwGCyeD6XYi8hhUg8XcXl7xL11MlSdGWYnmidjSoKJY80 UWpqk7WMQXGlMwKftff+xaAYJ8pQ+HL4VLBzz/5tnBkMQp+TT0dh1QdQDTaTrqKrH2x0paWa X-Authority-Analysis: v=2.4 cv=WqUrMcfv c=1 sm=1 tr=0 ts=68761700 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=EUspDBNiAAAA:8 a=COk6AnOGAAAA:8 a=VHSkhjcgKWVwXbDC_XQA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-ORIG-GUID: Pdnk5SgZuNlATzv0Pg5IlhS5aFUvLsF2 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.7,FMLib:17.12.80.40 definitions=2025-07-14_03,2025-07-14_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 phishscore=0 mlxscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 priorityscore=1501 impostorscore=0 clxscore=1015 lowpriorityscore=0 malwarescore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507150079 Content-Type: text/plain; charset="utf-8" Some platforms (like sa8775p) feature one or more GPDSPs (General Purpose DSPs). Similar to other kinds of Hexagon DSPs, they provide a FastRPC implementation, allowing code execution in both signed and unsigned protection domains. Extend the checks to allow domain names starting with "gdsp" (possibly followed by an index). Reviewed-by: Dmitry Baryshkov Signed-off-by: Ling Xu --- drivers/misc/fastrpc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 85b6eb16b616..d05969de406e 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -27,6 +27,7 @@ #define MDSP_DOMAIN_ID (1) #define SDSP_DOMAIN_ID (2) #define CDSP_DOMAIN_ID (3) +#define GDSP_DOMAIN_ID (4) #define FASTRPC_MAX_SESSIONS 14 #define FASTRPC_MAX_VMIDS 16 #define FASTRPC_ALIGN 128 @@ -2249,6 +2250,8 @@ static int fastrpc_get_domain_id(const char *domain) return MDSP_DOMAIN_ID; else if (!strncmp(domain, "sdsp", 4)) return SDSP_DOMAIN_ID; + else if (!strncmp(domain, "gdsp", 4)) + return GDSP_DOMAIN_ID; =20 return -EINVAL; } @@ -2323,13 +2326,14 @@ static int fastrpc_rpmsg_probe(struct rpmsg_device = *rpdev) case ADSP_DOMAIN_ID: case MDSP_DOMAIN_ID: case SDSP_DOMAIN_ID: - /* Unsigned PD offloading is only supported on CDSP */ + /* Unsigned PD offloading is only supported on CDSP and GDSP */ data->unsigned_support =3D false; err =3D fastrpc_device_register(rdev, data, secure_dsp, domain); if (err) goto err_free_data; break; case CDSP_DOMAIN_ID: + case GDSP_DOMAIN_ID: data->unsigned_support =3D true; /* Create both device nodes so that we can allow both Signed and Unsigne= d PD */ err =3D fastrpc_device_register(rdev, data, true, domain); --=20 2.34.1