Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp323696lqp; Tue, 11 Jun 2024 05:57:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWVWxOEcpWYOVtiHGKKsG58aGP9KmYKRFEbxVD04ohIF/4r4j2yQeS0rcPY12A+z9rQc3JnJJ9coflYlFKmfKawKjFi8IUTbw6edQmjFA== X-Google-Smtp-Source: AGHT+IGUhbsfUtgNoBItjhHZ/MmT9HO1FH/C0Nle9oxg3jFCHoh596ojFMgvlS6qMCfX0ohlxe9P X-Received: by 2002:a17:906:89a:b0:a6f:1fc0:3fc0 with SMTP id a640c23a62f3a-a6f1fc04524mr354114666b.6.1718110651105; Tue, 11 Jun 2024 05:57:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718110651; cv=pass; d=google.com; s=arc-20160816; b=x8okFi7jwWUFJ6ZYcSY64kow7CGm1gFz6YjFwfz4i8VqNC3FYBcFsd7Hsuo2ianMKV +ycEIrvpg4vb4XxCrhkJrHcrYvDqVPuEiiRHA62kFDpbhuVIZsF7N0f019FpByBcFMeg O4+1sJkCgvJYj/PnGj0Hvwn2bu7fMfWlLgSPF9MZ0JcpcfCHMGnzVSU/wdW0+x2LYNct tf6tqkBqmDTv+oAsuYtVexAh0m3XoGNhnmspDtUasU8UI0Xw6HLL+WkRiZXSv6OOQPQa FGGVah6/AHd2pnwLFtxgz791G4xdcqlPbsJkhqZI4OyhsiaCkSl3wtQeDQ2hD9G5jB1F oC5w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=qOLL2w/rzLwNxe2wZERfG6GzBq2EnQrBeXLoklpb1fI=; fh=PzpMulJQO6wPuLVAihl06WOk72bEmomu5eC/CUvtfSk=; b=Z3jDIcuBVJv8h+Pgj7y//ABYzgLvqY0YfH1uCq5AQvk5qPyNL/Tp0g5B9txfV7rIFL Qj+EC87rvaOyUbIq6FuWWYiI8E5F0oqiNYQ29/jBn/uV0NvsobhSnZwSm1ktOj7oxNjn S0jLckFNHD69sYE60RXqWtxZk17Q6dT6mMYO5KZ0JTV3yjgnskd0Oz746sG1Wf/tZpVk RjMHIsGA+L5PhUo3TlT9y96RGFaIfS98/EAFZzYBrI9ZXi1NxXA8le/DmSh+xYfBzV3D jcBm6DDUMKWHoEw+/MMZl546IIaeOhkowZp4wHHbrl3iPO+b2RJbGohFpvGwwDacUBWf 9/VQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Sing4V8c; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-209886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f17c80169si247505066b.873.2024.06.11.05.57.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 05:57:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Sing4V8c; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-209886-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209886-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id CD8B91F23C82 for ; Tue, 11 Jun 2024 12:57:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D677017C7BD; Tue, 11 Jun 2024 12:57:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Sing4V8c" 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 8F53217C20E; Tue, 11 Jun 2024 12:57:22 +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=1718110644; cv=none; b=cnpcmFPmYEApNKbDE/YtCgniNnKkY2U/NZtS7aLQglg9mKxBF/bYj49IcuzHMOVEtLwRQ5gBkqdzmCfx7clUyXURobeVoo0Hm5vmWlp5gHl2aGWbT26dK4c1c5CPqQTQi2uYQJEuq6Kw9Z9OPCSV6l2vRNjn7Jk+GJ4J7Ib2/3E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718110644; c=relaxed/simple; bh=Fg4CW2jkBYTXO46zwqsEMmfeMiA7LCyd/nJn4NmShSc=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=L/5Qd0Bsz/OfIl065XIq9L2bzkyAICHawEPZeueMXm4w2m/XJ7WosCJTH4YbOuP1n77E0LZ/hcSq/YInoVrO6BTEB/9Q5gCLkoPY2gGE0h7Js9GswMJXcP1+AHZHVALAyi3iWJd7ZZV+b2bqgq1OYIbny9dITRLgvADsGlEDYpc= 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=Sing4V8c; 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 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 45B9cK87013691; Tue, 11 Jun 2024 12:57: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= qOLL2w/rzLwNxe2wZERfG6GzBq2EnQrBeXLoklpb1fI=; b=Sing4V8ckagCkoGr /GDe90rn+2JmAXqXBZI9l8m4Bs70RvR+dArM4XRYaMxlVGuFB0MdPJBSSMTm9/uW DrJSJERfkQRVNHfiYhlryETq6wjPiiz5jkxjy/3hllKBw7P1tal4yCf4S4/b+bWQ unH78TsiWxi/PL+kZHJJEhiToFVycT7pJFHRXJlC+ezcBQsAih69nUKvUSMcr5+F oWlvYhZjpkVTrQ+mVE6teYaGAYSpE4mKVZMOeV+F8qyKG10yM45fS5bLcv+kmdPf ta9oX8ya7JpJBdSfmPCbhOW7QCkG+TdEaWRvQMVWhsNzWbpp7Kl8sP66sMZx8P2D /dj1Iw== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3ypm458gbj-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jun 2024 12:57:06 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA05.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45BCv5QS025409 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jun 2024 12:57:05 GMT Received: from [10.216.51.73] (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 11 Jun 2024 05:57:01 -0700 Message-ID: Date: Tue, 11 Jun 2024 18:27:01 +0530 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 v5 2/2] misc: fastrpc: use coherent pool for untranslated Compute Banks Content-Language: en-US To: Dylan Van Assche , Srinivas Kandagatla , Amol Maheshwari , Arnd Bergmann , Greg Kroah-Hartman , , CC: Caleb Connolly , , <~postmarketos/upstreaming@lists.sr.ht> References: <20240524161423.15392-1-me@dylanvanassche.be> <20240524161423.15392-3-me@dylanvanassche.be> From: Ekansh Gupta In-Reply-To: <20240524161423.15392-3-me@dylanvanassche.be> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: fZD6-YCRhGrVW2m6aLT6ph-4u8lwh_sc X-Proofpoint-ORIG-GUID: fZD6-YCRhGrVW2m6aLT6ph-4u8lwh_sc X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-11_07,2024-06-11_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=999 phishscore=0 malwarescore=0 suspectscore=0 bulkscore=0 spamscore=0 clxscore=1015 priorityscore=1501 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406110094 On 5/24/2024 9:44 PM, Dylan Van Assche wrote: > Use fastrpc_remote_heap_alloc to allocate from the FastRPC device > instead of the Compute Bank when the session ID is 0. This ensures > that the allocation is inside the coherent DMA pool which is already > accessible to the DSP. This is necessary to support FastRPC devices > which do not have dedicated Compute Banks such as the SLPI on the SDM845. > The latter uses an allocated CMA region instead of FastRPC Compute Banks. > > Signed-off-by: Dylan Van Assche > Reviewed-by: Caleb Connolly > --- Reviewed-by: Ekansh Gupta > drivers/misc/fastrpc.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c > index c06667b29055..f53d20e2e07e 100644 > --- a/drivers/misc/fastrpc.c > +++ b/drivers/misc/fastrpc.c > @@ -953,7 +953,10 @@ static int fastrpc_get_args(u32 kernel, struct fastrpc_invoke_ctx *ctx) > > ctx->msg_sz = pkt_size; > > - err = fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf); > + if (ctx->fl->sctx->sid) > + err = fastrpc_buf_alloc(ctx->fl, dev, pkt_size, &ctx->buf); > + else > + err = fastrpc_remote_heap_alloc(ctx->fl, dev, pkt_size, &ctx->buf); > if (err) > return err; >