From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0BEF8C11D3D for ; Thu, 27 Feb 2020 18:47:14 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D99A7246AA for ; Thu, 27 Feb 2020 18:47:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mOP2sA0q"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="EBgRVvpA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D99A7246AA Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CfAJ7xqeMWSl1Db27Qn81jUW9oZBFdSEkC49u4KGZNc=; b=mOP2sA0q9EWcXZ OfML8f9fgWemKUCACuEH5OMtVpFrIp4siP+QzacAG4qAoAYcqmmIWEdEREJgotXLprnOkYDdbNTos ueiMnrVinGTE0ZabhvGFq+Ea354tfnF3Bi8BygRh5XK4QMgKu2C6ljqHBroxFdsBQMXBktyNjJED5 88H6fiCLqC/ZUmnfMzzSLzkRwb1qgBNpPSA5tKSEvkXcrwIaPcKCs6i9LHjSAntuItJ03Uu9wQrLJ LpJm9teWrMe4SZxeWacpjcEKdNsPpiBYTWq+8CtlhqdkThsNoAsWsX8LmwZ+qVL+aEqQvUfzikxTD e4MvRddsxStwrVpZwIIg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7OBl-0004v5-JM; Thu, 27 Feb 2020 18:47:13 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1j7OBi-0004uV-2S for linux-arm-kernel@lists.infradead.org; Thu, 27 Feb 2020 18:47:11 +0000 Received: by mail-pl1-x644.google.com with SMTP id t14so147487plr.8 for ; Thu, 27 Feb 2020 10:47:09 -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=lcrpnq/b6/hpdUjJ7BPbI1dg5z0iJwDYFP4cImRT74Q=; b=EBgRVvpATZd+QdllWh7NgaqS+BEpB4r+tKv0NcGj8T6IejQ3JSGblsVlM3JqSpvkUp KFswIxe3vj9uVxeHURFe7KHbkZfbgW5bpPj2+sz2YA5/jW2xsej+si7DyS+cHQnuFKpo Grytv0YQSoYqUtgbsgqWNtco4yYJYJU/3/kItHoEyRlzenpJIgYyjHD9vjzxocZOgYPn TGXazEmGe9xX8g35FKQZAe9OTufWqwCCCUsQdMEqjbOJR993VDCAfV4BipMoCXNtpAEn 8ob3I4Isj6uIVUuuo1HrvNHQT8xlcmUKu/UapSmtGiuvC/+nGD4eGDbki6Jg2Lrk4yAQ xqEA== 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=lcrpnq/b6/hpdUjJ7BPbI1dg5z0iJwDYFP4cImRT74Q=; b=U3N59eUxldtLn8b77TDU4eL1/ZGyhvQZ9P+2TN7O8a3/Rhz+19DRFhEj2l24yVx2KX i0pQnViWweE5tOBcAwMGJyXMowxDo9Kfhe0p8aUvl7XfJgG0IjbQsPdKdKT53zrKkZ/g Oig7pw4JmAheerFVwPG5q6GG0GVDQOsv7wxWmgFmS436I2YNPUWUQuvgUhXgrsBe14Ta ZEX7U+H0qu9aLM4VcUCZzFeFC/Gjblja2JsPl3BZrcchU7lGvQaDKlTLjeznUl/yIJq6 yLFYxJt/ljsS7o/cLDWyzAVSk5UOf3y2+8xGotqUuf3tHoBAXI27COChLT2bREj9miJr TLkw== X-Gm-Message-State: APjAAAVjVRWOX/MfxoP98XyCTTvNcK5bBylzJTu32QGNTpxlF4Qw1b+G QIphX9/kZ35XB4RvMKiSGPao0A== X-Google-Smtp-Source: APXvYqyyvmpMV6UxoiAw6oNqpaKxbRnOQVGywr7htIuimBaTBFfOvraztV8a2ntnrTPplYWpShvBMw== X-Received: by 2002:a17:90a:b386:: with SMTP id e6mr354511pjr.106.1582829229170; Thu, 27 Feb 2020 10:47:09 -0800 (PST) Received: from xps15 (S0106002369de4dac.cg.shawcable.net. [68.147.8.254]) by smtp.gmail.com with ESMTPSA id e2sm3343567pfh.151.2020.02.27.10.47.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Feb 2020 10:47:08 -0800 (PST) Date: Thu, 27 Feb 2020 11:47:06 -0700 From: Mathieu Poirier To: Siddharth Gupta Subject: Re: [PATCH 3/6] remoteproc: sysmon: Inform current rproc about all active rprocs Message-ID: <20200227184706.GA20116@xps15> References: <1582167465-2549-1-git-send-email-sidgup@codeaurora.org> <1582167465-2549-4-git-send-email-sidgup@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1582167465-2549-4-git-send-email-sidgup@codeaurora.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200227_104710_173553_BB3F9888 X-CRM114-Status: GOOD ( 18.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ohad@wizery.com, tsoni@codeaurora.org, linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, bjorn.andersson@linaro.org, agross@kernel.org, rishabhb@codeaurora.org, psodagud@codeaurora.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Feb 19, 2020 at 06:57:42PM -0800, Siddharth Gupta wrote: > A remoteproc that has just recovered from a crash will not be aware of the > state of other remoteprocs. Send sysmon notifications on behalf of all the > active/online remoteprocs to the one that just booted up. > > Signed-off-by: Siddharth Gupta > --- > drivers/remoteproc/qcom_sysmon.c | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/drivers/remoteproc/qcom_sysmon.c b/drivers/remoteproc/qcom_sysmon.c > index 851664e..d0d59d5 100644 > --- a/drivers/remoteproc/qcom_sysmon.c > +++ b/drivers/remoteproc/qcom_sysmon.c > @@ -457,6 +457,7 @@ static int sysmon_start(struct rproc_subdev *subdev) > { > struct qcom_sysmon *sysmon = container_of(subdev, struct qcom_sysmon, > subdev); > + struct qcom_sysmon *target; > struct sysmon_event event = { > .subsys_name = sysmon->name, > .ssr_event = SSCTL_SSR_EVENT_AFTER_POWERUP > @@ -464,6 +465,17 @@ static int sysmon_start(struct rproc_subdev *subdev) > > blocking_notifier_call_chain(&sysmon_notifiers, 0, (void *)&event); > > + mutex_lock(&sysmon_lock); > + list_for_each_entry(target, &sysmon_list, node) { > + if (target == sysmon || > + target->rproc->state != RPROC_RUNNING) > + continue; > + > + event.subsys_name = target->name; > + ssctl_send_event(sysmon, &event); > + } > + mutex_unlock(&sysmon_lock); > + The changelog is specific about crash recovery but to me this code will run every time an MCU is switched on. If I understand correctly, in a crash recovery situation or simply an MCU coming on line, you want to make sure the subdevices associated to the booting (or recovering) MCU knows about subdevices that were registered with the sysmon_notifiers before it. If that is the case, the changelog needs to be modified and a good chunk of comments need to be added to this patch. Lastly, shouldn't there be a provision for sysmon->ssctl_version == 2? Thanks, Mathieu > return 0; > } > > -- > Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel