From patchwork Wed Mar 22 13:30:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mukesh Ojha X-Patchwork-Id: 73426 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:604a:0:0:0:0:0 with SMTP id j10csp2344564wrt; Wed, 22 Mar 2023 06:34:33 -0700 (PDT) X-Google-Smtp-Source: AK7set8vHB5vLRZbGmCjNSfqpriukDPGtYZ0mGl6FZah/bHWxMWhkOaOSBtjs9OC9kaS0k3EIYRr X-Received: by 2002:a17:902:ebcf:b0:1a0:f8ba:ae55 with SMTP id p15-20020a170902ebcf00b001a0f8baae55mr2633402plg.7.1679492072735; Wed, 22 Mar 2023 06:34:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679492072; cv=none; d=google.com; s=arc-20160816; b=yK2O7vdnC6upS+PjXB2r95hETYTowcTHegeeCV1fTahmqMffuOb84Dl9ePTa/5Wefx tXYYPmgsv53utrjWI0KfTpJoIcyPmvgo0DZhNRiJLii6PoIbk8Uwzr6Im4GusnG2gNbi Xh3U3D7oZdIfeKcxc1Jg0+JO6/gyd1nWKsEfeGFuHqyKUOIQmFP2qRfnQKXQXk9XVqeY wrN4fVQOHQs73MZ8yvVq1H1eWtp27/gG30PhuZfu8ag9YWzwlJ6VOP4vLJJ6jFy33v1w D5Tjx/sJZEq3sCAjlchxf7SMUxOHk+YjCPv5FpfpDbtPrPdHTl3roHqlQV3uhQuZA9W2 NwTw== 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=8nYnzsuGMPsj8JOqe13LRPBczbL/fuoMs9/mE/rmmaE=; b=rmSEq0MxjUfgLQ8/SZ3FTSWBGoMdDxEHdM2Jeqhm6gnx7dPD/Yne6P8laRy8OQBgJY 4T2yl5ZWQoAE1dbXmKoyCB8aD0d9sS47YZ0OJWgX9PIBPBnX0kZw0CZMLlIrUay2SdWK qnZXb8j92Sio2buJtqyRvFe7qBgQZeB5J/gy9JQF/EYORL9QF6WJJXDmGgm6VAIRjRwn +qtYsYDrEwRxGtXw0JndZ11dQwcMd+uf2ZbokFULhFku37G6KdARzMSa6JT+OliaLy9D +JV3swi9mP3mg1DG2UfdIhJWfokOEkffDxTz5w0qbZ5oYUFu7004Bhifj0YCcLNTBzDG rwrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=X03QKN4N; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a170902d88a00b0019e6d80f948si16724632plz.485.2023.03.22.06.34.19; Wed, 22 Mar 2023 06:34:32 -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=X03QKN4N; 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 S231134AbjCVNbv (ORCPT + 99 others); Wed, 22 Mar 2023 09:31:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231137AbjCVNba (ORCPT ); Wed, 22 Mar 2023 09:31:30 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93A3910D1; Wed, 22 Mar 2023 06:31:26 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32MCpcd5032660; Wed, 22 Mar 2023 13:31:10 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=8nYnzsuGMPsj8JOqe13LRPBczbL/fuoMs9/mE/rmmaE=; b=X03QKN4NYu93RufzwPPydp0MUvzRl2QbwkZ5aMhMaERjnrmUwBAPPXaDRem9cuwCblM4 k+e1TuIzhD9Q1BPQ7j6tCBR811PYbckhbuwqIFgtZO4oDp2fvaCPVu7GSCcQGioe2Qzp 4zcbihYfW/3S4Kx8zth+OrcVQv+//YJWsCBXDsV8FPVCDLUfaBBXVIuI9NYpPhhC4NZ8 nW96oqJiBrtALUW3nMOtgiFqvei3/OKGZsSL4rERHrWw3stoniwRpESz4VlBypNdI0MA EIms2nO30dIuDIy+DOC9dnwNXUXgFHjFuKBnjXEIpnWzyIiOOP15lo4XfPLp+HMVa4ZI VA== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pfhnx284y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 13:31:10 +0000 Received: from nasanex01c.na.qualcomm.com (nasanex01c.na.qualcomm.com [10.45.79.139]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 32MDV9rj013613 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 22 Mar 2023 13:31:09 GMT Received: from hu-mojha-hyd.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.986.41; Wed, 22 Mar 2023 06:31:04 -0700 From: Mukesh Ojha To: , , , , , , , , CC: , , , , , , "Mukesh Ojha" Subject: [PATCH v2 6/6] remoterproc: qcom: refactor to leverage exported minidump symbol Date: Wed, 22 Mar 2023 19:00:17 +0530 Message-ID: <1679491817-2498-7-git-send-email-quic_mojha@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1679491817-2498-1-git-send-email-quic_mojha@quicinc.com> References: <1679491817-2498-1-git-send-email-quic_mojha@quicinc.com> MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] 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: OnW_maYzV8fjuRDitSe10T3kXENK82Hk X-Proofpoint-ORIG-GUID: OnW_maYzV8fjuRDitSe10T3kXENK82Hk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-22_11,2023-03-22_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 adultscore=0 mlxlogscore=999 lowpriorityscore=0 impostorscore=0 clxscore=1015 phishscore=0 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303150002 definitions=main-2303220098 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761075079568338147?= X-GMAIL-MSGID: =?utf-8?q?1761075079568338147?= qcom_minidump driver provides qcom_minidump_subsystem_desc() exported API which other driver can use it query subsystem descriptor. Refactor qcom_minidump() to use this symbol. Signed-off-by: Mukesh Ojha --- drivers/remoteproc/qcom_common.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c index 88fc984..240e9f7 100644 --- a/drivers/remoteproc/qcom_common.c +++ b/drivers/remoteproc/qcom_common.c @@ -94,19 +94,10 @@ void qcom_minidump(struct rproc *rproc, unsigned int minidump_id, { int ret; struct minidump_subsystem *subsystem; - struct minidump_global_toc *toc; - /* Get Global minidump ToC*/ - toc = qcom_smem_get(QCOM_SMEM_HOST_ANY, SBL_MINIDUMP_SMEM_ID, NULL); - - /* check if global table pointer exists and init is set */ - if (IS_ERR(toc) || !toc->status) { - dev_err(&rproc->dev, "Minidump TOC not found in SMEM\n"); + subsystem = qcom_minidump_subsystem_desc(minidump_id); + if (IS_ERR(subsystem)) return; - } - - /* Get subsystem table of contents using the minidump id */ - subsystem = &toc->subsystems[minidump_id]; /** * Collect minidump if SS ToC is valid and segment table