Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2750306ybv; Mon, 24 Feb 2020 10:53:59 -0800 (PST) X-Google-Smtp-Source: APXvYqxkaBJoMndt7fMLAgPEg2FbbuXUCWmubJZkROf/c8MZLKfCl+HZcMWL3Q4O4SMEmPT9eBP6 X-Received: by 2002:a9d:66c1:: with SMTP id t1mr37501352otm.73.1582570439750; Mon, 24 Feb 2020 10:53:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582570439; cv=none; d=google.com; s=arc-20160816; b=dCCpKIw+k8WfoL+qA1kXmOImlCn+sMhZCguDB1nSzBadx5BLcnUgm8YrDJSPw5KDyx jaOK8X8U9Sj6Gkg7wIhZX/W4cxsdICpGM7LUDGhFgu9swA1R0PYLhhIVmBZ7YCqcUVI/ +llvauusouj4ied9d2F2gh4tNeLFfGzT7YBMzT7vuExFP2zSfjUrZYFXcDtcGoHGHp+b QcAeE6uDzEvPQFvHdQRtRKL1QwADpQLxfjz++u2A7M4ZdMPWeJt8jgQvjV05Tjgkw3d3 /1TQMMIvR0TG2vwzD0gKIG9bl0uuczB6U2KK7v5kyPIM9knMWkcDLDVn9RRIuaSEXCps FxSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5o+NRLE+XeQOQqO+QGCBe9virQiAW2Yqk+LqPr6RM+k=; b=jtiPQOMAqzMYm+KvliSW/cGeRq/dfc203aTS1MJ4iDBz0wAxclZjzj28rBDm2NxQsz ImXXlOg+JsbWJwJlhwSXVIc/AiAtVBnaCLg1mBZx46gkVXqLhuSyR1XNrSAVJDlfHpfV J6lyrwUG4La1Jo7m/y96JDzVyJ+7qllodZYntbRXxGlhlxZmabciu4WogilqLx1utLHy RWf26pi7iwLsjnIcQ8pym9LQ6UcqCOBPmPPTwZ/+GbXcqOUYHHePNaKUr+5scdag9afb k2Lou2YcoxEkrGpYAt+otbF9L1SSB3AgLSDgZMnEgPjLeH3lqNHsTliQZF8OLMpsLUrg D7Kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="zlXKmr/t"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g17si6395454otr.261.2020.02.24.10.53.47; Mon, 24 Feb 2020 10:53:59 -0800 (PST) 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=pass header.i=@linaro.org header.s=google header.b="zlXKmr/t"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727797AbgBXSxi (ORCPT + 99 others); Mon, 24 Feb 2020 13:53:38 -0500 Received: from mail-pf1-f193.google.com ([209.85.210.193]:43465 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727426AbgBXSxh (ORCPT ); Mon, 24 Feb 2020 13:53:37 -0500 Received: by mail-pf1-f193.google.com with SMTP id s1so5795605pfh.10 for ; Mon, 24 Feb 2020 10:53:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=5o+NRLE+XeQOQqO+QGCBe9virQiAW2Yqk+LqPr6RM+k=; b=zlXKmr/tXaX2hjWqTpQ2njtzL2v39uLcpNTrh6YWx5o5mRLOnjMG0dB9wXvhmk4/QP mszWYPx63JNQ0rNx9QhLrp2Ty2oJ62q/wHOeDBTmyJcxFUC2gD/GsB94xMpHsLz+SIJo oaU2MtzeREnx5KcWl+gpwnp9dGoL2pvM6cwAVb26fFIAjgMLcUidsFJSrGce6IY2ddtH DHHkfjIClkjdJ9Ksj84wcjHPezT++M655R7NO5VWHNuSwIANqs/8bQtR2iHA5Av/beM6 Yt9YlYL4zMXwazL8tbEG1TVgex9D/w4/dlMdEuSmroq2NvA+xmREquf6s839RLDJS8GH gQSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=5o+NRLE+XeQOQqO+QGCBe9virQiAW2Yqk+LqPr6RM+k=; b=ODECRL1//rObx8c6wF5eD8rk6xXY/oGiz4jKLc+anS73PiJuhxdCKGGJsk2EOWhFqP NgOXN20Uon0/Gyf1DtG1sGlnTsqhwXgr7PAjC6WYeP6KQaSJX7SBwuWHVsnKRarsqYvw 73g6MP4Y7+jLd2VfVTWmMLRUPCMTQjpOmd/EQx9o6wyigT69P67nOvMQJ8f+v9QrhZKJ hHZmTrEY3KJaJTDGKrXJyydpZ8UZSxpH024a3isUdJkLVmUIzmJNcsOPYSHrAIwtxR8d nA64wemrUBJ+S6uJgwJKb/+wptKluHGhsPy+DBAkrT8nQrqbBYahH7q1AZSJWVubfOMY aSwA== X-Gm-Message-State: APjAAAWUyX9GqMe69F3HXlGCdjLao/4SE5ckNw7RyuB32wjNtvQ95Ihf dp1mVAOja5bFYxttuKx2lWIFAg== X-Received: by 2002:a63:7ce:: with SMTP id 197mr44461643pgh.429.1582570417176; Mon, 24 Feb 2020 10:53:37 -0800 (PST) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id j4sm13931577pfh.152.2020.02.24.10.53.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Feb 2020 10:53:36 -0800 (PST) Date: Mon, 24 Feb 2020 11:53:34 -0700 From: Mathieu Poirier To: Siddharth Gupta 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 Subject: Re: [PATCH 2/2] remoteproc: core: Prevent sleep when rproc crashes Message-ID: <20200224185334.GB9477@xps15> References: <1582164713-6413-1-git-send-email-sidgup@codeaurora.org> <1582164713-6413-3-git-send-email-sidgup@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1582164713-6413-3-git-send-email-sidgup@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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