From nobody Tue Oct 7 07:20:53 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 269F52248B5; Mon, 14 Jul 2025 05:42:19 +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=1752471742; cv=none; b=t9Z15x4TdNUw5fFqdYoz9mdGnVw/DCDC8VHFvetQ1UBr8piqWYcZ37Q6V3DkQU3ZOAskKvJSjy9l+vp3DSohVBLxGDLq8YGY0yekNumwzo7Exk67Lc9Jgf6QsVAtMW7EYM40OTqtyWwVJnPWPLmPfowcGLrpC8Uw/KY0Yyu554I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752471742; c=relaxed/simple; bh=fqbvJrI+IqfMhJ+F7o57qQrzaEQaz/fr4Y4MbPwJQwQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=caxe3wiTSO0uB7UV8OL9BjCNN5joL9w0g8PzPQ50LaUX6Q4oD/7juWrNdMumm56rkOTDVa16QIvEBbmInSCq/Iz72zb7/uYwhXnDOehM9riAswJaVG1obN6H9HgCfXI3BO1+QeXfoVgvB/pJmkX7WRdLZFTPO3Oe/YdgWj77NMk= 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=dvUBoQwG; 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="dvUBoQwG" 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 56DMeVD6031774; Mon, 14 Jul 2025 05:42:14 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= JTuVMqUgMolS7Y4hFP5zBBuVyicnV/EiH2vJSZ4JifE=; b=dvUBoQwGVO9IXAEp VNd/YDQHy8BU3ZH7xCNe4xWJfNfTX8dk14+iNWfcIYXG59qC1ioL1fWwRD0qQpSm CwPCJngWm1kXbf6zpkXfNIzVZ2Zy6eh1eewH4tRTn63Mi4NVX+hY1yUTcLhqNKaU Glsskx80DZQbl0bN8l9pHkRER3UnZk3j0aBNxGfpwyIrNL5XV8CMrbJHAzz+Rmdm vHSpXPMQoHlI2P58tqnbT829ovUIWdT7wF9mjFHJsiGT04Kt7xEL2A/UrAe54fjQ p872LDr5Zf5cPeNJE7x9oau0thgVgCYmV/jV76k1hddyl9Sd22xOIj1oF4gGG3Q9 szpfGw== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 47v56a1w7r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Jul 2025 05:42:14 +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 56E5gD6H007150 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 14 Jul 2025 05:42:13 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; Sun, 13 Jul 2025 22:42:09 -0700 From: Ling Xu To: , , , , , , , , CC: , , , , , , Ling Xu Subject: [PATCH v7 4/4] misc: fastrpc: add support for gdsp remoteproc Date: Mon, 14 Jul 2025 11:11:33 +0530 Message-ID: <20250714054133.3769967-5-quic_lxu5@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250714054133.3769967-1-quic_lxu5@quicinc.com> References: <20250714054133.3769967-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: pcTelH7Z3AxyqpRXOf8xKJsrUjrFkbZA X-Authority-Analysis: v=2.4 cv=X7BSKHTe c=1 sm=1 tr=0 ts=687498b6 cx=c_pps a=JYp8KDb2vCoCEuGobkYCKw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=GEpy-HfZoHoA:10 a=Wb1JkmetP80A:10 a=COk6AnOGAAAA:8 a=VHSkhjcgKWVwXbDC_XQA:9 a=TjNXssC_j7lpFel5tvFf:22 X-Proofpoint-GUID: pcTelH7Z3AxyqpRXOf8xKJsrUjrFkbZA X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNzE0MDAzMSBTYWx0ZWRfX7hUDKWU96jcy G246zzdfHBcFvsBE11rM3UCa++bu8uL2tDdOjjImunhtH8Kvo7valmDr0ul/Kq1BrAbYv/B1sGK NIIZ0nkS0VDK177ePO77hUK6OiIrMkkLhA1jzXkaer7tS9DgyMcqX/aCTtjFDSVtB0ET8HzERJF cgYRlY0wj6+RR141NBuYrVweAHJtUQCcHfYWI1wQ8j8NmS5Zyk+Fw7hLI3NVv+61i7j9QPYHbyJ PMpdTdqLLk7SL/7+4V8kHiKyOpDJflLUykP3LhKY5lzK7mguIbrGPxVhh7/dhmjfJfCrtLjqk6J OrfSRzwEbGF4HOMj+AFeNaeTxcWsHiDOc6+WPb+K3ifVcTZBKPspXB8odtuzNWAFo8dgZDcgEo0 wHo0RSRiNvC3LXszPp3zI7eip0TOq7mUM1x/vW7mZVWmlk0W35JbR5Bc3eVXXUiCG4P/ngGX 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_01,2025-07-09_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 adultscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 impostorscore=0 clxscore=1015 malwarescore=0 mlxscore=0 lowpriorityscore=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-2507140031 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). Signed-off-by: Ling Xu Reviewed-by: Dmitry Baryshkov --- 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