Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp1539058ybg; Thu, 4 Jun 2020 12:15:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyb3TcGd0xyIRpYdiElTj0TVuiZXmQwJPxor/e++ob5LXGjjS1mMWr/TcKCRK8WTblLj5EK X-Received: by 2002:a17:906:af62:: with SMTP id os2mr5144077ejb.345.1591298153504; Thu, 04 Jun 2020 12:15:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591298153; cv=none; d=google.com; s=arc-20160816; b=Q+Cj6mMIoRoDEwE/w9YfJL3ELp0cJqtQMzaoC8Sd+pV6BYnS64/klWON0E2y7PAfOD 0kpqyjSMRRLBrDvGPPXQD7GmWjwo2l9+OXeoP/cLgSLUf198KD+RkQpxGAE6Dt3vZW3G hYVYyF7RTTDNhvexQz18W8qbE65He6ZuWu5Jgt35H/RQGUZWD+ejxBkOGsyIzXpXdsbp Mw/CwoJNXJjcSJKzoYuYYiLUDn1Q76ZfviTMyqZpQ3gRfccVNNX1fNu2Ipo/5RVL64EZ 0JWI9C3XoFoMksEOMkSVLQ254X0sJo5vd10BWtzZWCPZS43AoisExGOXMGjVAUdemTbj ojOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:message-id:references :in-reply-to:subject:cc:to:from:date:content-transfer-encoding :mime-version:dkim-signature; bh=l6wlzfSYbJzkeSugvF6FSEks0oM2Zf6QKufmIi2dOJ8=; b=AL8mob8TYiOPgHTk6SeH7kxJHdLgBzZo5bqBZ140ImTifNb3S2ybM/lbT8Qw88ZZro cFo2YIlLCNGBqyUoy5Sfrp0EZnLeXHCwd5TwQDo8bi3Kd/Pnyy+Jyd5d7g1dSt8/GvEu VwT6vdMwTncidMkF5pIfpztmrALPxEmi3vztuGCS0HMP7MODUVda+q/KFonsY0E05+CI 017oWeeBwEzEJRkXt1U8JugJhGficQI//f0w7ER6oK1s4qpF6BY63/JAwCB2w7vOcV2C yFlWLRBnU0inXfE08Ende1gcXrA7+XmB51lc5hSCvwdZhki4xcOEmIvPhoyLI0uF45ra i9Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=MglHwX8m; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp6si2335710ejc.472.2020.06.04.12.15.27; Thu, 04 Jun 2020 12:15: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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=MglHwX8m; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728865AbgFDSuX (ORCPT + 99 others); Thu, 4 Jun 2020 14:50:23 -0400 Received: from mail27.static.mailgun.info ([104.130.122.27]:51204 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728834AbgFDSuX (ORCPT ); Thu, 4 Jun 2020 14:50:23 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1591296622; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=l6wlzfSYbJzkeSugvF6FSEks0oM2Zf6QKufmIi2dOJ8=; b=MglHwX8mPoTVrR6AByjV49hXMHl1S9n0yBcrEIZ7Qd7FyO2w3HvH1KvK3y+iN8d8FGYJl5Hj IRskhnqA11l9lWzHESp/OK2imh84FhPc9zXaZBHON5aKOqItxCsuZos/tMfeWQWP48Kl2QO6 QfauAy2+n8Ksl+PdyJsf19rYSQ0= X-Mailgun-Sending-Ip: 104.130.122.27 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 smtp-out-n03.prod.us-east-1.postgun.com with SMTP id 5ed9426076fccbb4c8f7e004 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 04 Jun 2020 18:50:08 GMT Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 3532FC43395; Thu, 4 Jun 2020 18:50:03 +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,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sibis) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5E782C433CB; Thu, 4 Jun 2020 18:50:02 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Fri, 05 Jun 2020 00:20:02 +0530 From: Sibi Sankar To: Evan Green Cc: Bjorn Andersson , Andy Gross , linux-arm-msm , linux-remoteproc@vger.kernel.org, LKML , Ohad Ben Cohen , rohitkr@codeaurora.org, stable@vger.kernel.org, linux-kernel-owner@vger.kernel.org Subject: Re: [PATCH 1/2] remoteproc: qcom: q6v5: Update running state before requesting stop In-Reply-To: References: <20200602163257.26978-1-sibis@codeaurora.org> <6392c800b0be1cbabb8a241cf518ab4b@codeaurora.org> Message-ID: X-Sender: sibis@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-06-04 04:03, Evan Green wrote: > On Tue, Jun 2, 2020 at 10:29 PM Sibi Sankar > wrote: >> >> Evan, >> Thanks for taking time to review >> the series. >> >> On 2020-06-02 23:14, Evan Green wrote: >> > On Tue, Jun 2, 2020 at 9:33 AM Sibi Sankar >> > wrote: >> >> >> >> Sometimes the stop triggers a watchdog rather than a stop-ack. Update >> >> the running state to false on requesting stop to skip the watchdog >> >> instead. >> >> >> >> Error Logs: >> >> $ echo stop > /sys/class/remoteproc/remoteproc0/state >> >> ipa 1e40000.ipa: received modem stopping event >> >> remoteproc-modem: watchdog received: sys_m_smsm_mpss.c:291:APPS force >> >> stop >> >> qcom-q6v5-mss 4080000.remoteproc-modem: port failed halt >> >> ipa 1e40000.ipa: received modem offline event >> >> remoteproc0: stopped remote processor 4080000.remoteproc-modem >> >> >> >> Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource >> >> handling") >> >> Cc: stable@vger.kernel.org >> >> Signed-off-by: Sibi Sankar >> >> --- >> > >> > Are you sure you want to tolerate this behavior from MSS? This is a >> > graceful shutdown, modem shouldn't have a problem completing the >> > proper handshake. If they do, isn't that a bug on the modem side? >> >> The graceful shutdown is achieved >> though sysmon (enabled using >> CONFIG_QCOM_SYSMON). When sysmon is >> enabled we get a shutdown-ack when we >> try to stop the modem, post which >> request stop is a basically a nop. >> Request stop is done to force stop >> the modem during failure cases (like >> rmtfs is not running and so on) and >> we do want to mask the wdog that we get >> during this scenario ( The locking >> already prevents the servicing of the >> wdog during shutdown, the check just >> prevents the scheduling of crash handler >> and err messages associated with it). >> Also this check was always present and >> was missed during common q6v5 resource >> helper migration, hence the unused >> running state in mss driver. > > So you're saying that the intention of the ->running check already in > q6v5_wdog_interrupt() was to allow either the stop-ack or wdog > interrupt to complete the stop. This patch just fixes a regression > introduced during the refactor. > This patch seems ok to me then. It still sort of seems like a bug that > the modem responds arbitrarily in one of two ways, even to a "harsh" > shutdown request. > > I wasn't aware of QCOM_SYSMON. Reading it now, It seems like kind of a TL;DR Sysmon when enabled adds a lookup for qmi service 43 (Subsystem control service). When we shutdown the modem, we send a SSCTL_SHUTDOWN_REQ to the service and the modem responds with a shutdown-ack interrupt. If you have rmtfs running with -v turned on you can notice pending efs transactions being completed followed by a bye I guess. > lot... do I really need all this? Can I get by with just remoteproc > stops? > Anyway, for this patch: > > Reviewed-by: Evan Green Thanks for the review! -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.