Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6996096rwn; Tue, 13 Sep 2022 12:05:29 -0700 (PDT) X-Google-Smtp-Source: AA6agR4xOBahzdeXe/0dEV07AVU88tG4wBObZS9nFDowdJSuF/DRIHjO69JabecqCWrWHBOEBVoC X-Received: by 2002:a17:906:a219:b0:6e4:86a3:44ea with SMTP id r25-20020a170906a21900b006e486a344eamr23730288ejy.385.1663095929371; Tue, 13 Sep 2022 12:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663095929; cv=none; d=google.com; s=arc-20160816; b=Job3xWSUZhA6Jghcbl7DpYr7yRGeJ+TMQTOZXeXXU+I0wq2KRimpfOFIcvfBjSN8oy j/Bit58zmP8DqCi7+nk6fb9U+nfbNA11eI+9VlZ2wI63FSBjnpQdHbGZpA1Q+9iso2Lj g0XR5H8C3Rp43YW0wlcOt/FWNQy/nzlTq9GrB23wAoUOckD2LUkT0c3FJaZCUy7jSD+5 UvmcMkVKCbNbEZ3WGDRmgMMLgxc9p38b55Yj1GTtAdU1A0WEfjzdweciI3utyui4pEGX YCCj4NK2urqtElJV/R8o54186faun1Esy1XTf3ma35QPHJrwZFtfrg3zBQv4+NCTCOPU Fh5A== 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=x/heB6q2D/lSJBzQsR7Yoo/qqho43QjYowbw3qAX/6k=; b=zrglOAjx1HgG96RDJhfxkGd8mEbUAZt03tVQNHhFXAgSO7ImZe/a8gXM4SnLMOWOuf +ZrUQB0KMb27XiROi7sEmlb7kcrKTRjrK8vH1Bzcyf9ZkSJydEzRoZs6GE9waeKfZKmJ VVvjjfFZv7DuM1VEbeDiAZIo6qWv+CUzLvUeQAbJol+CsRbhIQqTzth5zKULTr/ZB0K4 IB/WUDXwZHa1qJ1KEBmN+iGkh7NYNqGSil4LNWL+AR6JZsWGl8ZyCBcUcasbZsNSEM1s Siwbu9OPtPRjueZxsLgeDBU1L8XlV4tx3imTbLjo9VlUa7JKnB0y3Gz6eiplQ7BKPCTW DQ6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Z8XJGYqo; 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 d35-20020a056402402300b004485081f004si9166534eda.598.2022.09.13.12.05.03; Tue, 13 Sep 2022 12:05:29 -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=Z8XJGYqo; 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 S229816AbiIMSwZ (ORCPT + 99 others); Tue, 13 Sep 2022 14:52:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231503AbiIMSvx (ORCPT ); Tue, 13 Sep 2022 14:51:53 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AA886381; Tue, 13 Sep 2022 11:36:08 -0700 (PDT) Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 28DISxap023142; Tue, 13 Sep 2022 18:36:00 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=x/heB6q2D/lSJBzQsR7Yoo/qqho43QjYowbw3qAX/6k=; b=Z8XJGYqopyUJchfPnHmcHVo0ajzfkKHYSbQKWpY7SzOsR/N4DW+NbvRdKsxUg+wasy+J pypS/SfLkCflu10DmUIrBYZdiq+d2ODoDgEes7ctGHSS7MHQMYNldIKQUZNZtFH3JUF6 ao09X5jo+201Eo+UnMTg/67MmvxGw+RRanreQ7E2d5/IO9jj4xyE/u8cTVdtF4Zn+o99 EV0/W1TQlyCDIUG4+iHx19hMbQ8RlJsPSsVHnPVlQJYD2ZzHLMRCFZORtPjnG6h+lnK1 PJHEwiKVttN1qGAETt5Q9hcPlE1pRfxMOBEaocfuJ7ZFOJ1S03uBwm6ODSsrwAr1HnMK xQ== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jjy0e0195-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Sep 2022 18:36:00 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 28DIZxOS029286 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 13 Sep 2022 18:35:59 GMT Received: from hu-gokukris-sd.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; Tue, 13 Sep 2022 11:35:59 -0700 From: Gokul krishna Krishnakumar To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Mathieu Poirier CC: , , , Trilok Soni , "Satya Durga Srinivasu Prabhala" , Rajendra Nayak , Elliot Berman , "Guru Das Srinagesh" , Gokul krishna Krishnakumar Subject: [PATCH v1 3/3] remoteproc: qcom: q6v5: Avoid setting smem bit in case of crash shutdown Date: Tue, 13 Sep 2022 11:35:44 -0700 Message-ID: <9e549a54e2a6ede3e413de933fd1725c660993c3.1662995608.git.quic_gokukris@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: 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-ORIG-GUID: bnP1ArD21dhUlS2dpIgVor6FUBRkKT1l X-Proofpoint-GUID: bnP1ArD21dhUlS2dpIgVor6FUBRkKT1l 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-13_09,2022-09-13_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 mlxlogscore=863 suspectscore=0 malwarescore=0 phishscore=0 clxscore=1015 priorityscore=1501 mlxscore=0 lowpriorityscore=0 impostorscore=0 spamscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2208220000 definitions=main-2209130085 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 Avoid setting smem bit in case of crash shutdown, as remote processor is not able to send the ack back. Change-Id: I33f19087627e5a7fe2c3bcce377b51b903574bc4 Signed-off-by: Gokul krishna Krishnakumar --- drivers/remoteproc/qcom_q6v5.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/remoteproc/qcom_q6v5.c b/drivers/remoteproc/qcom_q6v5.c index 1b9e1e1..569427a 100644 --- a/drivers/remoteproc/qcom_q6v5.c +++ b/drivers/remoteproc/qcom_q6v5.c @@ -237,8 +237,10 @@ int qcom_q6v5_request_stop(struct qcom_q6v5 *q6v5, struct qcom_sysmon *sysmon) q6v5->running = false; - /* Don't perform SMP2P dance if sysmon already shut down the remote */ - if (qcom_sysmon_shutdown_acked(sysmon)) + /* Don't perform SMP2P dance if sysmon already shut + * down the remote or if it isn't running + */ + if (q6v5->rproc->state != RPROC_RUNNING || qcom_sysmon_shutdown_acked(sysmon)) return 0; qcom_smem_state_update_bits(q6v5->state, -- 2.7.4