Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp612517rwn; Thu, 8 Sep 2022 06:32:22 -0700 (PDT) X-Google-Smtp-Source: AA6agR4FeJuXMtH8aXmP4SGm1JYmlmI0WWS60wdwiCiynoUAnd4ChiLaNQZI4w5ej1pG6Hq27UlD X-Received: by 2002:a17:907:c0d:b0:730:a85d:8300 with SMTP id ga13-20020a1709070c0d00b00730a85d8300mr6110209ejc.558.1662643942034; Thu, 08 Sep 2022 06:32:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662643942; cv=none; d=google.com; s=arc-20160816; b=NGmxZI91BmK1UqiX0+ksCeD6QDbdJPaXlPnG1XzwVSK574pnipT4CfQadR/Na98XLz 2XE4sKQCjtepu0xxzcFU0S8u1AZlCEslGCokIzAgeXaoHX5xJQ/uDHWaZxGp+0N0nJ9p sEvSrEkDxmnTnXeCcJT16G3+kGpO53qPivxNdKEW2O++t8MG3BCW8zKqKjMhVajK3U49 eD22sktvJ9XyCwYN+s8Jb8fefIsB6iQZOMkM8/p/DygqNdM+HbpLzHhnhhtDWZ0u2cY3 07NF+xXC8zPMUSB0jzqluVR1IJ/zQCzkpW2WOG/2L001mfe+KWhA8FASccbt5XirCxdv UjKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=2lCZ7W5Kg5TwxMXm79c6PLIxs/rk0iWi1iEBArgHEj8=; b=dsxt0cpEwYRzDehtWgTqQWaxtQdv6yS8wRBNS8XC+Crg2j7ozDV6EwIi+JSmBhjJoe d5/wtyj/SoAldP00t+OfBjQIZp76hwzg4u0QO+y4zZQnzpi2Aw60jiUILnI+yecXfiZ4 zSw5TGV/v47jqes2r+EU14ecp9FM8asbTOhZXMuWfqurSIETH7tBiMIy2d2UJVhPcRsW htftfvQYrjvd86ZQH5N9c1eERvRvJir7gagUnFV3wijQsuwCtKio0R2/8z7kBDhoyqHq +OCiz2tWXiVUo6DaWC5nqedqBqm05j3559380vxAcVTyFj7r6eqKL894PnNlRp3z/mQS FpQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Z65ynPZK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pj7-20020a170906d78700b00730a3906ecfsi1708421ejb.110.2022.09.08.06.31.55; Thu, 08 Sep 2022 06:32:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Z65ynPZK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231359AbiIHNZb (ORCPT + 99 others); Thu, 8 Sep 2022 09:25:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232477AbiIHNZO (ORCPT ); Thu, 8 Sep 2022 09:25:14 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5E10F804B5; Thu, 8 Sep 2022 06:25:07 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 288CxdM9023208; Thu, 8 Sep 2022 13:24:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=2lCZ7W5Kg5TwxMXm79c6PLIxs/rk0iWi1iEBArgHEj8=; b=Z65ynPZKHh5GtKNfC5qeQEaoPMBTWPRk/0wta7kP9Y64ObvOim/kADbcgkGaNULvIx7F tYAaZgj2vQyqt23iZhrbSt2frp6FzwFwDyxvfxq5q4UKFaAH9DabbEVkVT+WFocNMXdG kpDMO1TA5pgTusWEYEB5UjR/TCtKnWOCmPOgxgj9JeGpr7yH4XRbNX+SKJPLksSGIcz0 8oqg196j0ca58rc5rhHParCsiGW8dyyg9PXMykT0uSlp1w0IOfoaCMAl8kdTokKWrsHW H5+ABpsKsqlXPVK/qTREZEIs6vZm0Jm62qdUnxPeJq/nVrJIYdoKVRFtW1iNMQna0kN/ 9A== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfcjkgpqa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 08 Sep 2022 13:24:27 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 288DOQVQ005393 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 8 Sep 2022 13:24:26 GMT Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Thu, 8 Sep 2022 06:24:21 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , CC: Srinivasa Rao Mandadapu Subject: [PATCH v6 4/8] remoteproc: qcom: Update rproc parse firmware callback Date: Thu, 8 Sep 2022 18:53:38 +0530 Message-ID: <1662643422-14909-5-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1662643422-14909-1-git-send-email-quic_srivasam@quicinc.com> References: <1662643422-14909-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: VTp7Fb7SUGv5IZ03-893mj8f8gWgvuEB X-Proofpoint-ORIG-GUID: VTp7Fb7SUGv5IZ03-893mj8f8gWgvuEB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.528,FMLib:17.11.122.1 definitions=2022-09-08_08,2022-09-08_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 adultscore=0 bulkscore=0 clxscore=1015 impostorscore=0 phishscore=0 mlxlogscore=999 mlxscore=0 spamscore=0 priorityscore=1501 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209080049 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Change parse_fw callback in rproc ops from qcom_register_dump_segments to rproc_elf_load_rsc_table, as section header to be parsed for memory sandboxing required platforms. Signed-off-by: Srinivasa Rao Mandadapu --- drivers/remoteproc/qcom_q6v5_adsp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/remoteproc/qcom_q6v5_adsp.c b/drivers/remoteproc/qcom_q6v5_adsp.c index 02d17b4..207270d4 100644 --- a/drivers/remoteproc/qcom_q6v5_adsp.c +++ b/drivers/remoteproc/qcom_q6v5_adsp.c @@ -447,7 +447,7 @@ static unsigned long adsp_panic(struct rproc *rproc) return qcom_q6v5_panic(&adsp->q6v5); } -static const struct rproc_ops adsp_ops = { +static struct rproc_ops adsp_ops = { .start = adsp_start, .stop = adsp_stop, .da_to_va = adsp_da_to_va, @@ -590,6 +590,9 @@ static int adsp_probe(struct platform_device *pdev) return ret; } + if (desc->has_iommu) + adsp_ops.parse_fw = rproc_elf_load_rsc_table; + rproc = rproc_alloc(&pdev->dev, pdev->name, &adsp_ops, firmware_name, sizeof(*adsp)); if (!rproc) { -- 2.7.4