From nobody Tue Oct 7 00:30:46 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 AF94952F88; Wed, 16 Jul 2025 13:29:26 +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=1752672568; cv=none; b=iwlmPM008PUL42bK9eHwDJqH65YhbOOVL6CSLVFFN0cYXg6OzLj8knZNUpXfISzWyl25axWNZkKp94u0yIdRM771pdXcA6tgtSwfFcmguWHfDZcSl8LFh+IiPsWvLe1Y9yI+qEiFXIyLYR6yMS+b0owxmY2R/cn8MTBdnY3TfZI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752672568; c=relaxed/simple; bh=m69eBpowmMuNvTB6Apw+JQZp8W3Cx09oDdHKlO4Ttzk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=kBle4rT+hgT5bYHaDvPXePG0RYoLmM0Kpq6XiLTeQKOazR8LOtVSL2eVcX53KdFUXxqgiwn/kHX3MhaeLi7bi6AV0YIsOFpztuPMQAyFtP+/BxL00FvKQF4+3edyN/pJUzdLGN5oN/BgQYrpcLqVzM8FPIzkSZJUElt4DTaMU8o= 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=mVIGaLUK; 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="mVIGaLUK" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56GC8VBb019284; Wed, 16 Jul 2025 13:29:19 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=mVIGaLUK6dYYtF57 9IwOO3lHnQQ+bb0yR2e1eh1YxWOpbjQl0g8T7kOVTNdeup090w8ArlKFdWZsAnoi TRZai9W7GLM8n3Wpvn4klj1t9ARHWSsiGv1MQQMXMX1qVo/hVIi1W2vI0dl0IVjR QeZGtHBBj9ghCZa+rtQG+legfI1LUntsNWgronf4YhZUdR+sNHuxgLAVAjV6JE4S 1vfR5mCALwYX3WK4zR3G9u5z3JtyQ2ZWmuLqnwqKvMcOE4PPgunns5aLdRhkLihK HAMBsWPtBe4I5vh3GabxsLZpt2WHhRTJF+6S+dBaN9eBE9QwZa+Ee44OVMco4JdA ohaXDQ== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47xbsq86qm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:18 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56GDTHoO024491 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:17 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; Wed, 16 Jul 2025 06:29:13 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Krzysztof Kozlowski Subject: [PATCH v9 1/5] dt-bindings: misc: qcom,fastrpc: Add GDSP label Date: Wed, 16 Jul 2025 18:58:32 +0530 Message-ID: <20250716132836.1008119-2-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250716132836.1008119-1-quic_lxu5@quicinc.com> References: <20250716132836.1008119-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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-Authority-Analysis: v=2.4 cv=ad1hnQot c=1 sm=1 tr=0 ts=6877a92e 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: JjZjUvqDw849lQpbEcXzpWG-HyugbS1i X-Proofpoint-GUID: JjZjUvqDw849lQpbEcXzpWG-HyugbS1i X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE2MDEyMSBTYWx0ZWRfX18evusjWQ4zi eVFqgatywuOYR/TNSNJL+/NxtSFtfGxZ5qXz5meSlop+bhtEIS6HTUsslP83zx065BkbyJZ+imb ATULH6VLq3cJ9a3g6M849PfABkdhHSFnsEQkRaKZ37v5abgucHJKGcGadzJK9ASAS9yC0/LPEQv PJLDEqXF5bPsqMXjkY6/qAvoctJKZ0hdQne3abwgOIaSJ5iPMLDSp44J1btt5Xb53EsOtND+a6A qtXtnW/GniBvNALRq9r4gO7opC9DTlvALF1Hm/DsrzRCvnYtVTEC7EIrf9jyKyO0hspaSxUpcF+ f9qEwiYJACjCsmTDglYa4Nc+dOD5UNgmU0ugeq45fNJkSrqXo0NWd4N9YgUAU+DBG6/24M1ni0h f5tnDUR/rEML9p42OVYPusyYgxSnS/ds7kRdfEy9TJFYPr6MEREWhHspCiv4DOxV3EFIwhN1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-07-16_02,2025-07-16_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 malwarescore=0 phishscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 priorityscore=1501 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507160121 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 Reviewed-by: Ekansh Gupta --- 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 00:30:46 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 797251DA61B; Wed, 16 Jul 2025 13:29:29 +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=1752672571; cv=none; b=hVSmMMSS1LnQGy8GGBGj9sLCPBaLAgD9h1RH3nfyFVkwr9aM1VeKMmbzx23TktFbxnsvORYJMfrbFfVEoXsRj5Kw53I89uSzbQu7Qm494qd/ynadCwvsfhCx1Jyn6aUIjlktCk4T0scNYjgblpWUOn56N0HUWDVjeHP/LI1ELOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752672571; c=relaxed/simple; bh=uVR1Ztg+lo0CfsukEJRg3CHLYxSDrvFZdpni4JXKNZk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MF9UzdL0hhOUEGo5UO4OTcr/Tty3kcDEDZfhsne+HFrvWp0bGFmtARFczjoGNap+dGXvELlOLru3DAqIzsmC899aAQMAl7J/faa9+XEkskRFi4mLgKYkDRtESRVY/sB14QSfKAo4/eOGm/2rEM9RNqw17tK9XLN5KLBpsMKN/Po= 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=iNfa/YLT; 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="iNfa/YLT" 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 56GCtB43014507; Wed, 16 Jul 2025 13:29:24 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=iNfa/YLTG8cqLta4 CIbapva8CiJs+84VXNHsZyojfrQ+/J5AsOsdLt3oHQg1jQ3m6lIk4kT7C5xEfokW 1N5NOVID2/fSyp0y/rc5iCzx6LTMyK5QLPCcF9alijpdJYj76IFKnJEJqtk77HHq psUxXR61tM5C6T1wB/Q8uGOXKmRuT7mSeTbF3F3imY2JKgLQQUfH5AINDAH9milC 4/B/C8cTrOC5WnFnlVvUqgto58AN1XVje6whwwN1ItU+FfWC7vFJBThBImDjPj6R y/OgE1g3EtwcGev2G8+O9dMrjbGFUX3aDTuhOb9RoOyHnyA5FD95CHDhyu80+GmW KWqLGg== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47w5dypyaa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:23 +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 56GDTNZ2026808 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:23 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; Wed, 16 Jul 2025 06:29:18 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Dmitry Baryshkov , Konrad Dybcio Subject: [PATCH v9 2/5] arm64: dts: qcom: sa8775p: add GDSP fastrpc-compute-cb nodes Date: Wed, 16 Jul 2025 18:58:33 +0530 Message-ID: <20250716132836.1008119-3-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250716132836.1008119-1-quic_lxu5@quicinc.com> References: <20250716132836.1008119-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: ZgOPjJSCGuW0do7HvZ_YvXOnOi2sxl8U X-Authority-Analysis: v=2.4 cv=RtXFLDmK c=1 sm=1 tr=0 ts=6877a933 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: AW1haW4tMjUwNzE2MDEyMSBTYWx0ZWRfX7/mqi1n2Hn3r LgG7eMda6B2fC+Greu49ZhNlFTY+9SDdTK1aIMwFBDdS6QKcuIn0kRQ2U1AunJ82NKeDzZplGjN zq1T9qkLOKmwJ8yLuoBpCdV9lYTiFwKSsBRI867UwineLX3iq5RW2JpjtrzqtVlVeJzgeLhoSB6 ZF7vLSleqSSAHlLMOQbuFhGMoAxA0iS0iuX3E1Nyu3/NgaI/JltybYGBwq84xmDb9O3I43lIcGG 4RleF7cDLDdOlnALrpMH45zZaK9ReUQSA729CEjjQZfcvcuAY+5L2JkeA6SwPpgxWmwCKy8k0Yi VCEDoUgSlNMtrgRXQKtjZTEvwbck76w4UvBL9cfNWz4/1sb+B8FXA2CV4bw+Wxc90yeawkEndAJ MMhWw7ToUiFxrLVs5gSRXE0EWp5YYabfk+/EhRqIQZjndMCNiPQNejGFEZ03Lwdl4ob4xsXh X-Proofpoint-GUID: ZgOPjJSCGuW0do7HvZ_YvXOnOi2sxl8U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-07-16_02,2025-07-16_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=861 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-2507160121 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 00:30:46 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 0B46A1E0E14; Wed, 16 Jul 2025 13:29:33 +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=1752672575; cv=none; b=Z/ob0bfvSBtShIPypwjnj2ICvBdEe3SP0Xb0CsElqkJ6B/dkJB5fIVZTHfMJ2i6jVieX0AmxjTOKFnFWamZscKFsx5FZU8D5VEKwfcGkOqgOJ0Dfpquy8lM1NjU00D7iEfMLTWMsL9oIrGWFjcPWkPB5SdimGz2V+6AIdNL9o60= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752672575; c=relaxed/simple; bh=/Qxf9OQgbNZ8lEPRverfoI6dauoHlXtB9fZPg+YyCkM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=E1zv/6fIC2dnX5yTAcHgcN5Li8TXawy0zHN6eWG90OUlW4I/klAWRLH81iOxXrU25relXWDjuj0NQR3KQkUwFVQ2ZqRiObAjehlrraG2vef83gWCWR8eE/iTFMwFzgPgnWvnbujSpJd2oXWtj+x7vHZwQm4uh0qYXTNKVBJAGss= 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=FnoME18f; 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="FnoME18f" Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 56GD7p2V020748; Wed, 16 Jul 2025 13:29:28 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= 14q04gf4fzv+dKpNp2BtEhm9YcLHNdKkIxGKHLV2BRk=; b=FnoME18fT9NVycrL JRFDLxmZclHeyAZ7FdudMpvBtNZ4pRiKsIlLvACCKsQqC9dlIwCOM+ec8lIrWZzl TCN9yxZhpSD9QkPP60Xh0BJrg3beQZf7QT0oFJhXAkRg92vsNBnsmOFrl6dgFhBp F5UadC0U5hrSK3XWxATiINqd1+OcjcQkVCOUh2YeXaJqJGnjf+aIYn1hdVdgwOos z0/KAnvFSEflE9vB/X4L1XVTNhFg9d+TpAsg9Ql3AP1e9RVKiGxpaIvjUWf/0dVf ZlxJMBdmuXrWWMKeDIYD2JfmhuOAqS7MSFfuThAPOQDFmcmGBbvsb9tnLD6qzzJn r5eLqA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47wqsy3vs8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:28 +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 56GDTRZ2026903 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:27 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; Wed, 16 Jul 2025 06:29:23 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu Subject: [PATCH v9 3/5] misc: fastrpc: Remove kernel-side domain checks from capability ioctl Date: Wed, 16 Jul 2025 18:58:34 +0530 Message-ID: <20250716132836.1008119-4-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250716132836.1008119-1-quic_lxu5@quicinc.com> References: <20250716132836.1008119-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: AW1haW4tMjUwNzE2MDEyMSBTYWx0ZWRfX3jREg1QB62Nc ibxov0TwYSCmw3Sw6IcqmbD7of0qMALHR9zsgr2glpbAEM9bYBUWvcKjO2ZcOx1bbqJpDgLwu9T +Js0x2Co/K4KM2i9BO1o+wnQu9vuzUq3Kw/qB4cbLboXZ5324xJt0PFGK4dtne2/Ozb5eAaZvse 2afxzKOLyUkJX6E8/oRT8VF2tHDFWoUhB+5HRNe6SvKGBYqmXYo9S83VcGeMzra8YIG5SGx0Egs 92xk7kd693b5FHzE9jNARnlAEAd/M6Ew4WjpaWiM1j6+2BZwo6NjJbTCYFpCfxF5QAE68pSyhyY J1VdFJgm3a7vNv87MUk+tHPYDa4EaaFdNGBav7jAKSYZOR40+D7VMbjnu6lKUDBwxCQYzMIgeKL 9JWGXganoVGpz61jCsHXDXo9nYCDjG8J/mHpTZK63Tf+NuRiVZS56OxnbNtTevwZuGxLCv7e X-Proofpoint-GUID: _t2Hdo8EmtXAZeQgLm9IHD4T3xdTnjlI X-Proofpoint-ORIG-GUID: _t2Hdo8EmtXAZeQgLm9IHD4T3xdTnjlI X-Authority-Analysis: v=2.4 cv=McZsu4/f c=1 sm=1 tr=0 ts=6877a938 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.9,FMLib:17.12.80.40 definitions=2025-07-16_02,2025-07-16_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 phishscore=0 adultscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 suspectscore=0 spamscore=0 priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505280000 definitions=main-2507160121 Content-Type: text/plain; charset="utf-8" Domain ID in the uAPI is misleading. 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 Reviewed-by: Dmitry Baryshkov Reviewed-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 14 +------------- include/uapi/misc/fastrpc.h | 2 +- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 378923594f02..495ac47e7f90 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -1723,7 +1723,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); @@ -1741,7 +1740,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) { @@ -1769,17 +1768,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_DEV_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 00:30:46 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 7E9E01B983F; Wed, 16 Jul 2025 13:29:40 +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=1752672581; cv=none; b=S1wD9X69kocQViYL/dgSTQdWjjehLoEz5gkcguPimC5Ew7bgfVn/YwQ4vtHRSJ86meQ36tVh8aL1aHiiRMW2/pHCGWCs9qjd2kaLp94dZkGR2EaQu5sDg9dOMsMNTSp6M18ZxLNIenVJXltKAaIlm2cIgKE9lbcOHdCNJxbn9T0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752672581; c=relaxed/simple; bh=VLf8ZApCDtduD1Kkq+ejICm0TZ5murXANxXziQvJiQk=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=jG+in8AGkt4zYx43mMXa/dT5PfuZI9KJYBKEDqAkASVpPx8mj/LOtvx9I9AWweIbOK6+TG6FCPrOa18mBsSDqDDL49F8TR5Qt5Ny0T3H65/9gAfrXIbPvNxdK6bPpgecRIBwwX08R5lPZute3f6aazKOBJBBjOoPsMR80rxgJ70= 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=P7BVh2i6; 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="P7BVh2i6" 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 56GCvEZh014537; Wed, 16 Jul 2025 13:29:34 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= lzPOv0oMByi4j18RzNIEkdQIs0FlRsXkdZzaQTgBX7Q=; b=P7BVh2i6GDLGY3Rq mZaKFXjjhBD+busJrRYb4HQURLqxVW2ZCk1V7J0eNqccyPVdmoRNX921oc5B3kaH 4EOHs6KaBjjcm8aZOqrKj5jDhTgu3fPUcXBA27N8iUyIaiwK/X0NN8sjxkMdJGZB +1Vb2AlWOnS7hLQ/aVFq+NsodqtMiPvtoE4lzSgOqTRvutJIhRPq7G/ygPNF5ljy Vc3ItXiB1jj9mTAkt49qIH2ERpDZ0e1GujwYn2kXZVVL2Kb+KQabwmdtLquJjDyO e+so4zDUk6hNFNPHMNP+BTzaKoMiRQJoJXdxxpyEYrmTIFF6fMGXFJS6jlinkEYm WvrAEg== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47w5dypyc1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:33 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56GDTXtk031689 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:33 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; Wed, 16 Jul 2025 06:29:28 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Srinivas Kandagatla Subject: [PATCH v9 4/5] misc: fastrpc: Cleanup the domain names Date: Wed, 16 Jul 2025 18:58:35 +0530 Message-ID: <20250716132836.1008119-5-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250716132836.1008119-1-quic_lxu5@quicinc.com> References: <20250716132836.1008119-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: LkFfLuN8fEdCeEXKDZmMZzthqZoKzPQb X-Authority-Analysis: v=2.4 cv=RtXFLDmK c=1 sm=1 tr=0 ts=6877a93d 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-Spam-Details-Enc: AW1haW4tMjUwNzE2MDEyMSBTYWx0ZWRfX6AV5AcO3X385 +camyNdvnuWlYKLVWTSmJBlsYS1dSrF6mu9jvf7Ip/scu8H8nSnLfdKgTG6QxxnuKaYFKk+7qKv q6sSdvwbGuuM+SHO760jYACYdGzJM7aEoSSshQ8DiTlaFsYPmnoY1eqm4NKBfF4zfZgAruyxPES vD+ei9sY2xeysrMrOLtIBCc+iQYu4d/9RaDopWEnJ8szCr05EB501DpypNeCnqFPjeK4lHL6+WH uThzFXAAgu0eJuqJ1AQPWx21d5HhRsJM1XGmJZLkOij4bixGa0QbzgyVX48E4NKn6PDLvbr9rdC adPk9cms2sCFltP0kSFEGe4V7cw7VQMEOwCHjAfxNQCEQ2qQraxShDxBGmuk9iCpi02QvipAw1N YAze9ZL5xuEEmoYtN7xmKDNhLTBmM66YFkjXYFgNiXt4PIY0AV9oJ9iqTFwL6nslmP8WZiMn X-Proofpoint-GUID: LkFfLuN8fEdCeEXKDZmMZzthqZoKzPQb X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-07-16_02,2025-07-16_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=1011 mlxlogscore=999 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-2507160121 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 Reviewed-by: Dmitry Baryshkov Reviewed-by: Ekansh Gupta --- drivers/misc/fastrpc.c | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index 495ac47e7f90..85b6eb16b616 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -27,8 +27,6 @@ #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_MAX_SESSIONS 14 #define FASTRPC_MAX_VMIDS 16 #define FASTRPC_ALIGN 128 @@ -106,8 +104,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 */ @@ -2243,6 +2239,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; @@ -2260,15 +2270,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 @@ -2318,21 +2323,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 00:30:46 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 876DD1C5F10; Wed, 16 Jul 2025 13:29:47 +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=1752672588; cv=none; b=uYo/3OlXrfNNTBu6lZUCuUQHSiaAlicrNezi3P5J/yrbtYXK5Ptra6AX8l5zclzxWCx5sQyxQTrp/x3sfZgkggdh+Wd9o5xXNAiM0Bqlf3Y/uL1oS9FqkFlnHjvXd7DiQNXf2obJLZ9GKgOWJZ3rUNNFcp+lilj9je4EjSeiU+k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752672588; c=relaxed/simple; bh=dLeLI6Z4FjKwIOWMA2g0zWgg/TP0SnyZNeM+LjQEqgI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iFnYVK4uT6aAgbXSqZDIQieKOMVWjL6lGjud6VcCjuKxDU3T7DyOP7403nh6Zn/IfiEuMsX9qGtmLZLB9bPAA8g3l5sGNpTY3fdMC0HCsNcUtlKyJt73xG15arHfqBzOQ+YEwhEj0zXVkX7xXhVODnj/El9NhnaYS1ZUOJTqso4= 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=FjYsWdFN; 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="FjYsWdFN" 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 56GD3Blo022730; Wed, 16 Jul 2025 13:29:41 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=FjYsWdFNftyWnLI/ NIlvph/5mFD1oM9vzGbY21YZLRDsPuhx4X5UUQkhj+TvSi+NPb7WbyDMRMS2aRQH 0J6BmhOCJAaLKaiEWfaS7KM3g2TN/4UJ3RK/ZvrXeQ3CtoLpBTu5gNxQIZDYTIfx uXLkwSib5RJkgF2tgj2OYNpU/rIH1oCC/EaQuKJGRy3dYdluv8yk89TYIVf0s2ec ESm/j9WJ+IeLMz0o5wdlO17SYbn1fXBYKDxVUtNpREcFbxXookKiN+ucJ8VnpxDF HJ6MuSdwRxjClFDRpc+1hlik7Lzwz0jHHoaXRW+qrychdq4h8kq8RVUcHIKThEWX 71vRFQ== Received: from nasanppmta02.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47wkrumsgs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:40 +0000 (GMT) Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 56GDTe8M025616 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Jul 2025 13:29:40 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; Wed, 16 Jul 2025 06:29:35 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu , Dmitry Baryshkov Subject: [PATCH v9 5/5] misc: fastrpc: add support for gdsp remoteproc Date: Wed, 16 Jul 2025 18:58:36 +0530 Message-ID: <20250716132836.1008119-6-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250716132836.1008119-1-quic_lxu5@quicinc.com> References: <20250716132836.1008119-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: nasanex01b.na.qualcomm.com (10.46.141.250) 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: dQ2NwE69ZyMhDYoM30JNggZGXtjiIEjm X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE2MDEyMSBTYWx0ZWRfX808VgscqiziV EGrkfBpCXPBnNkFRhVSMBQLLsmxz3+FTMsx10Te2c3C9L7M8osjyj8YifwE1HOAHuPo3jeU+uKe fBMdbshPnlLKLxOMZu2JkWoGKLrTm0ZlRuLQuig3LNzNw0gCLACC/qP5UEvH613XvIXmlMR7a6z 7QeHITwpaxa2r6iEhmHSwmzv2d+6a1kcmVqFd6pjib/8lD1b8s2Kggi4iYsgjo4NwNNylpFdvGZ WYVIRajxs34u90DO7WacFB2w7S4SHqTotzPMmQxpJFBVK8icf0c1Kg5qdglzJ/3zYj7gYktLfgM WZZL5pfdM63dQ06muHiqyl+Us4y+QBOs/1vabfMy+dPTGIhlPPlc5Y5IZlskKYedpbCNczuNisB mbRzv72uLdLk+J4WiWAtTsiRnEr8FMgPrjMixqhFUd5jbZVqPQ4fg1hTbcDM/3xIb4gx4sOr X-Authority-Analysis: v=2.4 cv=WqUrMcfv c=1 sm=1 tr=0 ts=6877a944 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: dQ2NwE69ZyMhDYoM30JNggZGXtjiIEjm X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-07-16_02,2025-07-16_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-2507160121 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 Reviewed-by: Ekansh Gupta --- 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