Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp177148ybv; Wed, 19 Feb 2020 18:58:19 -0800 (PST) X-Google-Smtp-Source: APXvYqwPPYJofQPGIFlUXhWiDm8OS46GhRgWfO2HKMkVtgY/fzRCV+0miDwUYhiVYSXM90TJfZ8D X-Received: by 2002:aca:b504:: with SMTP id e4mr612769oif.28.1582167499585; Wed, 19 Feb 2020 18:58:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582167499; cv=none; d=google.com; s=arc-20160816; b=Fx+5oMi5elVjcvmCKWNeR089Ipl2CqUxwnG6odnXO2Uj6ErE0yc/I0KjbNfABKpOpI dFdeBPlXwx4J/W8B4n8/CRnC3DQA9JDh1POkcE94p458/u4J2hjzGIjEFlG6MPod0jHc dnW/+oTClgfVmQAPFDFlxr4k3Gao/9M5T47ESB/rOwvyNBSlfOTUIEHjuGoaBd8Zo6kT 5BY7+g1qcP9E95UDmfaaG+yDs9bb07suzou/XY8HfcZnSKsMx+60JR4XP3lucLdr7Xz8 gk/RvumYQe+ubVl6Jb/kJ3pQJStP4m6JkowN/jBmr5L6odVIroLwGvl5MS/zFq74cIUg GlIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature; bh=5ceaaMSCCm3YPAR+D5NLBko4BNHYVXjbzI5l1pQJZTg=; b=fiN9xF2MYv2cXBejJpISpflEk6P0thnb8GUQUQ/+Kg2KLazuveqzjDjxUFLBay6Zk9 kzYIZRjPhZm9Dn54iYvsU93kz0vaGWdd7QLt/kZ5wvv7rGl4ocmTdVo3dxxtsMmRoTHi cJmDxfZyT89teEeO3f6EGHmeIaBbVxXSIPAhvfeB3+yHHgVxvREqbwKWxvz5Khf2O/c/ Uc5plIRvDmo620EW0ut97Sr8xjuK5X4vwRsTRkxr/QXuNFmSWIuOUiOTgT8C+CsMZsmZ 03J7tDbbZ+gBLEm7b2x7Ffb0NP/8MqhBjvtbThnw3ebi8JIjwWXio112nogCw9npXDoQ cxCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mg.codeaurora.org header.s=smtp header.b=JpQP8b2v; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r1si983135otq.298.2020.02.19.18.58.06; Wed, 19 Feb 2020 18:58:19 -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=fail header.i=@mg.codeaurora.org header.s=smtp header.b=JpQP8b2v; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727476AbgBTC6A (ORCPT + 99 others); Wed, 19 Feb 2020 21:58:00 -0500 Received: from mail27.static.mailgun.info ([104.130.122.27]:49700 "EHLO mail27.static.mailgun.info" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727506AbgBTC6A (ORCPT ); Wed, 19 Feb 2020 21:58:00 -0500 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1582167479; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=5ceaaMSCCm3YPAR+D5NLBko4BNHYVXjbzI5l1pQJZTg=; b=JpQP8b2vurjBjc51/HOFCcms4WYoWInuBKQdY8XMGlNynsSwui4si5rozwLwkHIECLu/loPA U5snd7Z4d3w0nIwWdXExOdbmEVA8dPRHrVKXmiB5d+vt+MKKoqhNqLU+J9YP746abbRxxlmL shaKO/DVda6a4dtmerfk5NHmIok= 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 mxa.mailgun.org with ESMTP id 5e4df5b3.7f90feb313b0-smtp-out-n03; Thu, 20 Feb 2020 02:57:55 -0000 (UTC) Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 08A5CC4479D; Thu, 20 Feb 2020 02:57:55 +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,SPF_NONE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from sidgup-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sidgup) by smtp.codeaurora.org (Postfix) with ESMTPSA id 4A719C4479F; Thu, 20 Feb 2020 02:57:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4A719C4479F Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=sidgup@codeaurora.org From: Siddharth Gupta To: agross@kernel.org, bjorn.andersson@linaro.org, ohad@wizery.com Cc: Siddharth Gupta , 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: [PATCH 3/6] remoteproc: sysmon: Inform current rproc about all active rprocs Date: Wed, 19 Feb 2020 18:57:42 -0800 Message-Id: <1582167465-2549-4-git-send-email-sidgup@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1582167465-2549-1-git-send-email-sidgup@codeaurora.org> References: <1582167465-2549-1-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 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); + return 0; } -- Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project