Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp1170637ybb; Fri, 10 Apr 2020 19:28:28 -0700 (PDT) X-Google-Smtp-Source: APiQypKgNNREyM8xEltq80+RGkfAO5LieUp3dY+w6CtKX/h63FFdve47fEXw8oxvNHix1Psgesht X-Received: by 2002:ac8:51cb:: with SMTP id d11mr1924311qtn.370.1586572108129; Fri, 10 Apr 2020 19:28:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586572108; cv=none; d=google.com; s=arc-20160816; b=EaVMhKx0V78fntOMjXGZmshwSrTQCGQSQqDWk91fBSzVet1cDOi6zFU1371sXTHAze Kwtfv1nZ/Zob1+bopFv3CREjU0h8z+pvzpk6+bVZ3yPF/rRrK1Bx7ogU/jqARtP2iIBh AaZuS/TZhxL4H2P4eS1jhPmraDYYVqRFF06lGOSKZYjzoEeRXtc308OLSQZ1vv8bngTC hN1C2E5ZbktECo6LurWmCYxaCOkmZAQ7GRU7EUQX7sSDUjuThelCnA3csh03pTszptUD kJNcQD0oqrLjl7N3eEvfYtcrPHKcSmGGjr53Itf4d3mBFEsWiCihkppBI9TfR0hjq18S CJDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=9QWTHRRLu2SNoXMVr8er30dtVtDUkqmUu8dqdXp0zBo=; b=UVZ2Z58flfSoc0jAu0rdT25a8mYWypNvUUHmDv1pu8NXvJ9n3Bkm6eONbuZqRHfAkO Tt/lZRbvkshk+vm7CDSyX50R+WXZ8ggMQoXAMKQFtJu/E5f08YxiTD+S3JTJyzJ647+i Z3fGDi8PIFvgouLTjpmLzx0Z84ESrSUELxomndw2qoyuCq7jHhH5VSMktnzZNJxwYI03 HstW1jOB5JBwjkOIuZKTHh0jvaGO1Jg/BvnWIelHaMTCZ81A0EmS6IdJP/Psxi6Ukir3 2//sVrcX3o9u3OIDoUvOurztgaZ+l3ld7H5JJ9JL65dQHJBONwqyi9OnlowiJlbPXRP+ Nt1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gwGyNDkE; 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 p10si2172107qti.49.2020.04.10.19.28.12; Fri, 10 Apr 2020 19:28:28 -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=pass header.i=@linaro.org header.s=google header.b=gwGyNDkE; 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 S1726671AbgDKC0T (ORCPT + 99 others); Fri, 10 Apr 2020 22:26:19 -0400 Received: from mail-pj1-f65.google.com ([209.85.216.65]:34545 "EHLO mail-pj1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726650AbgDKC0T (ORCPT ); Fri, 10 Apr 2020 22:26:19 -0400 Received: by mail-pj1-f65.google.com with SMTP id q16so2065723pje.1 for ; Fri, 10 Apr 2020 19:26:18 -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; bh=9QWTHRRLu2SNoXMVr8er30dtVtDUkqmUu8dqdXp0zBo=; b=gwGyNDkE+v0753EJpooO71QpVYwsLyrGTVnJYTW7Yzj6M0xU/QZj76chLAuTLZWSAG 9lHH/MJUJLj4kFuBpNvzcZQPf1j9fZu7O9hvQENB7QVNK+S/54ggxGTxL1m6I0ymfRWV rkO3WVrqJECAUj5XBVaZWIG3U2bVUfy0yY0NskrWVbSysKwt+Dp3bPHtrllJ3u2ZurMS D4XSSm4pjVrZ8kVJNSQeFuijeEjqdnYSePe1hz44i2MzsEbSyi1fTzVdIgOkKodgYmFB 5Q6p6aABytM5dpS+g2IPPItTlH0qU5SRAFRvv5uh5UNah6tRqWX/igx5ZsvwukX5xUX/ IvVg== 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; bh=9QWTHRRLu2SNoXMVr8er30dtVtDUkqmUu8dqdXp0zBo=; b=CoOms2wNr3Pap//o+rtllzUj5xxN8iWNNNom72AMgH/Sl+AocZ6EtymV241ldQkX47 Y19rbq4FjhvnW6GUpenBKm3gmoCxvAKftCMB7LjGHbrdBpf1HNTY1MXpaNlho6gNy8Ds 1TeKhh1pEupyzSeE0tCPLKwhqbYSgyzyes9PFV7njQgmMkhZbFcjjjpvc1mGKHq9x1mu eUkEKfNnYAXk/rF4RLZEAjkdT7LF1FufVHiLoUHfnzhTUIL/iZuaQzmxqYXhgsznyfK4 rAHcylrT2QB1STt1C80qgD9FUAqrRpDcRSTI1e9mjUDS5m8pOryQumjOO6DTsHBRZHrB iZAw== X-Gm-Message-State: AGi0PuaCLFp+2uv/aTteBzCZ7PWFLvn4Y8Nz3zgG7dvcrqHvcTP5CFzU Ju+25goPBhlefDKrzt4lmKJ/Jg== X-Received: by 2002:a17:90a:de0e:: with SMTP id m14mr8702041pjv.54.1586571977804; Fri, 10 Apr 2020 19:26:17 -0700 (PDT) Received: from builder.lan (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id g14sm2895868pjd.15.2020.04.10.19.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 19:26:17 -0700 (PDT) Date: Fri, 10 Apr 2020 19:26:27 -0700 From: Bjorn Andersson To: Siddharth Gupta Cc: 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: <20200411022627.GA826227@builder.lan> 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 08 Apr 15:18 PDT 2020, 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. > This is better, but I think it can be reworded further to show that it's not a matter of making it "fast", it's a matter of preventing suspend from interrupting the recovery of a remoteproc. > 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); Move this 5 lines down and give it an empty line before and after. > 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; > } > /* Prevent suspend while the remoteproc is being recovered */ PS. This patch is unrelated to patch 1/2, so please resubmit it separately. Regards, Bjorn > + pm_stay_awake(rproc->dev.parent); > + > 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