Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1690084ybz; Thu, 16 Apr 2020 13:45:54 -0700 (PDT) X-Google-Smtp-Source: APiQypJ1g4aCZ/FPJO9Bh2JpKEMDTaRJUkAjNy423rv6mx2BNAooJ1cGaRxqI8zxrL2/uFuDigEx X-Received: by 2002:a17:906:15d4:: with SMTP id l20mr11200616ejd.91.1587069953931; Thu, 16 Apr 2020 13:45:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587069953; cv=none; d=google.com; s=arc-20160816; b=mYURuuWUHqFwScsxxJ3fatJYVcglPOA7mHLP0pBPVZUmxejMyCG6JgceByQtiP28c3 k6fW4FRt4NpmDy39hQajUun79yvcN2ndAwH84gLOqwki95IPth3wBWY/cjAB0K7ZL88S n4R8vEokhf+/rTm1SUcJipwvwF/QiTGifo3RaWV7r1gs9Pgt8QGHewzl1tAuYvquBcPJ dP0XXIZczFaFtyY1rg3KCTOYYCCK/onAn+b1iCXvo3CQZTuqXlppPKmQqJrcp+caf7aJ N7E+RXH6/riSeSKEbZfcpDiU2MEm0p/8CrkK22pXymK4Vj5LJ5cRKeIFb0eYq+PN65uu tbHQ== 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=4+5yvpF/CzkFV4Q2jkIdrwA/yhScLV1YzzJf+T0+lT0=; b=yQ+GJCg5BjyHqwB4mdBLIUYt6OMIYcKPMdrWcJzWup23AC7aOqUr78B8dol6BAiN8t 0KW7NObZugNnxqqQDzjxpCWdA1C2iygtmyRUF+H6P/iNgwi/uKzlTe5wsL0k4xAYX8JB 6H7MPf3KTDFBl54MPyYKM5En/Jk/Kplp0UGTcmzcfC5qfS7DLoBlykCiv/vNUzVOFE5z kdYSdpcBZQ2NyCSq+2kooYQ2fomtCT8tr1pMTv+ggdN2lSFXGuyQHm2TSkwnuSVtFbFO 8B10HuJbm30HmLDuKVntqMWANBpjG8HhDHxrznwBYXKra+9bqJczd97rXPrtXOGK3UJV Y7VQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vCizqDZq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id bs10si3292467edb.429.2020.04.16.13.45.31; Thu, 16 Apr 2020 13:45:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vCizqDZq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728315AbgDPTls (ORCPT + 99 others); Thu, 16 Apr 2020 15:41:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725894AbgDPTlr (ORCPT ); Thu, 16 Apr 2020 15:41:47 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84484C061A0C for ; Thu, 16 Apr 2020 12:41:47 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id i3so2141622pgk.1 for ; Thu, 16 Apr 2020 12:41:47 -0700 (PDT) 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=4+5yvpF/CzkFV4Q2jkIdrwA/yhScLV1YzzJf+T0+lT0=; b=vCizqDZqzySQAlaQKNZSPfzWTNKVRci9vMWz/TPic+3XrkQ03Ffgkm9kWe0f4jZjUf 8G/6u6CSBI/Ollj0zVbg8YRdI9x7IulHItSD/ttIFKdkO77DNk9A2QM5GoXfHCf58OOY ENtU9vEBypBTtQvaaLBL8IVFxOKZCqadrz/x6ScCnlG0oxmakq9nru4cWYT20gdDgyY4 UI+drYXOPUwSRIZRBwmi9GvTGrryUnz5pMW4HOHttXbnoQotENvKHXfDGo8RgUaV0vxP 3QlZeNHsCFrYH93qGFHQbLR2Z2zNWAVNhknBrBzhUwknHU7g1S3YMLN4mvZEVckyopmG kNug== 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=4+5yvpF/CzkFV4Q2jkIdrwA/yhScLV1YzzJf+T0+lT0=; b=adanUkApuHxlTcVOAbU8J6ykiFm3HxSsnBOVAhFrIwWiJSRbUWAiBvMpEFyXs/Orjb SV+IvO2j/ANYi+dZzP4K8L4XWH2zuSn62VcnrXPTiNkC56UVdRLY1NzXwRcvmZbBNq+E +1BLsfFDCH1UFFiCFpHk7Gx24joWBhovp9vZgTfdKX7zLy0Y9D8A9gHxCtwKZTa2B5d6 eO7ruGjNBH0jNbZ6od9Hf7RkRVYW40LZzW0Y/+ndzt/pAyQrVyUzd/amtUPKtr2clOeD yM9DBDtxzql26xtbmomuPAv3Kdit3ZeOdP11/9PJJAc9t64r/OSN4UWF5bWSsnaXgn06 AqIg== X-Gm-Message-State: AGi0Puah416dZev8rLf9PVTOP7i99cho1NeQjOcLkKj8UQmKrAtD3qmV ir1E8f9C7OEcG26NJ2Q72j7NSzEFxIY= X-Received: by 2002:a05:6a00:c8:: with SMTP id e8mr32914135pfj.131.1587066106898; Thu, 16 Apr 2020 12:41:46 -0700 (PDT) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id y123sm17140605pfb.13.2020.04.16.12.41.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Apr 2020 12:41:46 -0700 (PDT) Date: Thu, 16 Apr 2020 13:41:44 -0600 From: Mathieu Poirier To: Siddharth Gupta Cc: bjorn.andersson@linaro.org, ohad@wizery.com, 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 v2 2/2] remoteproc: core: Prevent sleep when rproc crashes Message-ID: <20200416194144.GA30314@xps15> References: <1586384305-7825-1-git-send-email-sidgup@codeaurora.org> <1586384305-7825-3-git-send-email-sidgup@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1586384305-7825-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, Apr 08, 2020 at 03:18:25PM -0700, Siddharth Gupta wrote: > Remoteproc recovery should be fast and any delay will have an impact on the > user-experience. Add a wakeup source to remoteproc which ensures that the > system does not go into idle state while a remoteproc is recovering, thus > prevent any delays that might occur during system resume. > > Signed-off-by: Siddharth Gupta > --- > drivers/remoteproc/qcom_q6v5_pas.c | 1 + > drivers/remoteproc/remoteproc_core.c | 4 ++++ > 2 files changed, 5 insertions(+) > > diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c > index 7a63efb..6bb2c7d 100644 > --- a/drivers/remoteproc/qcom_q6v5_pas.c > +++ b/drivers/remoteproc/qcom_q6v5_pas.c > @@ -401,6 +401,7 @@ static int adsp_probe(struct platform_device *pdev) > > adsp = (struct qcom_adsp *)rproc->priv; > adsp->dev = &pdev->dev; > + device_wakeup_enable(adsp->dev); > adsp->rproc = rproc; > adsp->pas_id = desc->pas_id; > adsp->has_aggre2_clk = desc->has_aggre2_clk; > diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c > index 9f99fe2..19a360d 100644 > --- a/drivers/remoteproc/remoteproc_core.c > +++ b/drivers/remoteproc/remoteproc_core.c > @@ -1729,6 +1729,8 @@ static void rproc_crash_handler_work(struct work_struct *work) > > if (!rproc->recovery_disabled) > rproc_trigger_recovery(rproc); > + > + pm_relax(rproc->dev.parent); > } > > /** > @@ -2273,6 +2275,8 @@ void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type) > return; > } > > + pm_stay_awake(rproc->dev.parent); > + Much better: Acked-by: Mathieu Poirier > 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