From patchwork Fri Sep 9 08:33:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Aiqun Yu (Maria)" X-Patchwork-Id: 12971227 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37B32ECAAD3 for ; Fri, 9 Sep 2022 08:33:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231497AbiIIIdw (ORCPT ); Fri, 9 Sep 2022 04:33:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38682 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231393AbiIIIdv (ORCPT ); Fri, 9 Sep 2022 04:33:51 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D75B99836C; Fri, 9 Sep 2022 01:33:50 -0700 (PDT) Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 2897ow7G010173; Fri, 9 Sep 2022 08:33:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=qcppdkim1; bh=8jf/QpqBJviZyXzPRaKBkzbC7KaC8oXf6EYMyMbZqxE=; b=HJX+PXl5RdPG9zDCy/f3VbI0/plsCv3MN8nKIBvzNBul5awSZ1DiuenljgQjGqPpZKPt OzNvCCI5HovVx4RjiqLBhax2bi7v8Ybz7saQYMb860IvAVVdVtNvcNTfrYCLLwqM1NvV S82/iSrMgz3mMjO2L8ULczzBWThhX+SXnS1N87WJqboAysu6fje2P3GJygqI/1DOpDFo nrCBDcbQPJqOnSDsYjb14aLrhnn/L5zWbf9ywIPOPBBAxYSZvcbKrdt/6xlkxFxTNAk5 BDy/FMhLre+Q9/LOt+E8EgAyELpUEz9eqNtBOnarX4zEszXRCZZlobrMBBKJm1cI8TuN Sw== Received: from nasanppmta01.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3jfdc74260-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 09 Sep 2022 08:33:49 +0000 Received: from nasanex01a.na.qualcomm.com (corens_vlan604_snip.qualcomm.com [10.53.140.1]) by NASANPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 2898XmJQ015379 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 9 Sep 2022 08:33:48 GMT Received: from ecbld-sh026-lnx.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Fri, 9 Sep 2022 01:33:46 -0700 From: Maria Yu To: , CC: Maria Yu , , , , Subject: [PATCH v1] remoteproc: core: do pm relax when not first crash Date: Fri, 9 Sep 2022 16:33:33 +0800 Message-ID: <1662712413-38233-1-git-send-email-quic_aiquny@quicinc.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 4_1pdN4IQ5tBXZuxpRFRv6cWUxblEB7y X-Proofpoint-ORIG-GUID: 4_1pdN4IQ5tBXZuxpRFRv6cWUxblEB7y 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-09_04,2022-09-09_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 mlxlogscore=999 spamscore=0 phishscore=0 clxscore=1015 adultscore=0 bulkscore=0 impostorscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2209090028 Precedence: bulk List-ID: X-Mailing-List: linux-remoteproc@vger.kernel.org Even if it is not first crash, need to relax the pm wakelock otherwise the device will stay awake. Signed-off-by: Maria Yu --- drivers/remoteproc/remoteproc_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c index e5279ed9a8d7..30078043e939 100644 --- a/drivers/remoteproc/remoteproc_core.c +++ b/drivers/remoteproc/remoteproc_core.c @@ -1956,6 +1956,7 @@ static void rproc_crash_handler_work(struct work_struct *work) if (rproc->state == RPROC_CRASHED || rproc->state == RPROC_OFFLINE) { /* handle only the first crash detected */ mutex_unlock(&rproc->lock); + pm_relax(rproc->dev.parent); return; }