Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4622172ybb; Tue, 7 Apr 2020 11:03:38 -0700 (PDT) X-Google-Smtp-Source: APiQypJSXBgZprytxKCLgeJguY6bBzpBvFN+anNY0hY0Jn4+xaZCG0TeEmQekP40Ypw1VFOhJ9Ry X-Received: by 2002:a05:6830:1408:: with SMTP id v8mr2518782otp.123.1586282618806; Tue, 07 Apr 2020 11:03:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586282618; cv=none; d=google.com; s=arc-20160816; b=bO3/C7KyW6izKlsxNfpoUup1rpzbnlYhhl74KK2rg4attdq7K28eUOgDJHPo4/xag2 V0+0cuGcG9Itrf0RFqynIxvOkRsE5mwTF9Jx79j01/Fj/wW6lmhOmGj58Zgti8P3Zj0N rkyjGukSqeX4GjhwRZ7Q1LM8sz7rL0Whp+aCy/vVTbswOZKF/luuFnbd0DwoU5wljmjt Izf1TWf4njmvT3ABCxSD2fpZU+7/43Ozg4Pc2+nqhgJv0cj79RlBhdXsJihktDrFEYRR YX69cDsAMz+eqH9t03plWFYWPVch9PLGSqmIDvSw5rQVGvHHQEnfs5uvcEc8ePg/2hSZ HNYw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dmarc-filter :dkim-signature; bh=dk+x0rTY0DaiUKQYsPBwoDgbCv6jZ7mH7/iIl9UgojQ=; b=aJ4DhNHh5lpF61DqKCcW0r3NZS8LhhTEdn+Xh6TywBb4/G43FrmS56sob7PoS/q6lk LLlMUIS9z6/ZC3+wfS4rkPIo692a3mcrLpg4wHn5HH/hnynWqZGrAwpmIPiGaXGR3RNg UA92vK8Zx1R4lku9M0Na71pgcG8O/0hRde3j4e3pqA96UH5nV2+5mc5mbPg+iR9C/AjK Wgbq6WGOniT0E+LWzo9ZcFzDpQgN2YKI7WuFw9W3K4H70fujiHJ7gBU4aZb8fwdwZfqv U3orZxQo/9u9tH58hTDj7Edh9zMeyBJKM/3BPpDSaULv0oWxHm8TnzaKLoQjWAzvfe6u GQkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=mpn+6KPx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2si1384303oop.51.2020.04.07.11.03.03; Tue, 07 Apr 2020 11:03:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=mpn+6KPx; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726608AbgDGSAR (ORCPT + 99 others); Tue, 7 Apr 2020 14:00:17 -0400 Received: from mail26.static.mailgun.info ([104.130.122.26]:54692 "EHLO mail26.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726417AbgDGSAR (ORCPT ); Tue, 7 Apr 2020 14:00:17 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1586282416; h=Content-Transfer-Encoding: Content-Type: In-Reply-To: MIME-Version: Date: Message-ID: From: References: Cc: To: Subject: Sender; bh=dk+x0rTY0DaiUKQYsPBwoDgbCv6jZ7mH7/iIl9UgojQ=; b=mpn+6KPx3kOrqFmSaTGalpbzEooCphuhvGCJlVWg9DVzrK6Noqve/YJIz4BPorfPYJ7+JCp+ rKXlqC6b9cwk0B9Vbda7F93QNLB4OEdXdd1AKGLyInb8Hc6D4sUJhLkrKy4xIoUKeG0rws0q /bva+LkE8dFrwnLq71jbocQ+oF4= X-Mailgun-Sending-Ip: 104.130.122.26 X-Mailgun-Sid: WyI0MWYwYSIsICJsaW51eC1rZXJuZWxAdmdlci5rZXJuZWwub3JnIiwgImJlOWU0YSJd Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by mxa.mailgun.org with ESMTP id 5e8cbfa2.7f5469d50960-smtp-out-n05; Tue, 07 Apr 2020 18:00:02 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 5F011C44788; Tue, 7 Apr 2020 18:00:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=2.0 tests=ALL_TRUSTED,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.0 Received: from [192.168.1.10] (cpe-70-95-5-60.san.res.rr.com [70.95.5.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sidgup) by smtp.codeaurora.org (Postfix) with ESMTPSA id 2D70FC433F2; Tue, 7 Apr 2020 18:00:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 2D70FC433F2 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=sidgup@codeaurora.org Subject: Re: [PATCH 2/2] remoteproc: core: Prevent sleep when rproc crashes To: Mathieu Poirier Cc: ohad@wizery.com, bjorn.andersson@linaro.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, tsoni@codeaurora.org, psodagud@codeaurora.org, rishabhb@codeaurora.org References: <1582164713-6413-1-git-send-email-sidgup@codeaurora.org> <1582164713-6413-3-git-send-email-sidgup@codeaurora.org> <20200224185334.GB9477@xps15> From: Siddharth Gupta Message-ID: <1a6a8661-d44f-adad-b262-ff42633c7b38@codeaurora.org> Date: Tue, 7 Apr 2020 11:00:00 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.6.0 MIME-Version: 1.0 In-Reply-To: <20200224185334.GB9477@xps15> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hey Mathieu, I will be sending a revised patchset soon. Will try to address your comments there. Thanks, Siddharth On 2/24/2020 10:53 AM, Mathieu Poirier wrote: > On Wed, Feb 19, 2020 at 06:11:53PM -0800, Siddharth Gupta wrote: >> Remoteproc recovery should be fast and any delay will have an impact on the >> user-experience. Use power management APIs (pm_stay_awake and pm_relax) to >> ensure that the system does not go to sleep. > When you say "ensure the system does not go to sleep", you're referring to the > system going idle from the CPUidle subsystem? > >> Signed-off-by: Siddharth Gupta >> --- >> drivers/remoteproc/remoteproc_core.c | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c >> index 5ab65a4..52e318c 100644 >> --- a/drivers/remoteproc/remoteproc_core.c >> +++ b/drivers/remoteproc/remoteproc_core.c >> @@ -1712,6 +1712,8 @@ static void rproc_crash_handler_work(struct work_struct *work) >> >> if (!rproc->recovery_disabled) >> rproc_trigger_recovery(rproc); >> + >> + pm_relax(&rproc->dev); >> } >> >> /** >> @@ -2242,6 +2244,8 @@ void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type) >> return; >> } >> >> + pm_stay_awake(&rproc->dev); >> + > I fail to understand how this can be useful since there is no HW associted to > rproc->dev... Is it possible for you to elaborate more on the problem you're > trying to fix? > > Thanks, > Mathieu > >> dev_err(&rproc->dev, "crash detected in %s: type %s\n", >> rproc->name, rproc_crash_to_string(type)); >> >> -- >> Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, >> a Linux Foundation Collaborative Project