public inbox for linux-remoteproc@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Lew <clew@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Andy Gross <andy.gross@linaro.org>,
	Ohad Ben-Cohen <ohad@wizery.com>
Cc: Arun Kumar Neelakantam <aneela@codeaurora.org>,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-soc@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	runminw@codeaurora.org
Subject: Re: [PATCH v3 4/5] remoteproc: qcom: Introduce sysmon
Date: Thu, 16 Nov 2017 12:05:00 -0800	[thread overview]
Message-ID: <0ab5497e-94b4-6450-d680-14f002188714@codeaurora.org> (raw)
In-Reply-To: <20171115201012.25892-5-bjorn.andersson@linaro.org>

Hi Bjorn,

Question about the SSR events for sysmon.

Thanks,
Chris

On 11/15/2017 12:10 PM, Bjorn Andersson wrote:

[..]
> +/**
> + * ssctl_send_event() - send notification of other remote's SSR event
> + * @sysmon:	sysmon context
> + * @name:	other remote's name
> + */
> +static void ssctl_send_event(struct qcom_sysmon *sysmon, const char *name)
> +{
> +	struct ssctl_subsys_event_resp resp;
> +	struct ssctl_subsys_event_req req;
> +	struct qmi_txn txn;
> +	int ret;
> +
> +	memset(&resp, 0, sizeof(resp));
> +	ret = qmi_txn_init(&sysmon->qmi, &txn, ssctl_subsys_event_resp_ei, &resp);
> +	if (ret < 0) {
> +		dev_err(sysmon->dev, "failed to allocate QMI txn\n");
> +		return;
> +	}
> +
> +	memset(&req, 0, sizeof(req));
> +	strlcpy(req.subsys_name, name, sizeof(req.subsys_name));
> +	req.subsys_name_len = strlen(req.subsys_name);
> +	req.event = SSCTL_SSR_EVENT_BEFORE_SHUTDOWN;

Are there plans to add the other SSR events to sysmon notifiers? I think 
the SSCTL service expects to receive events about remote procs starting 
as well.

> +	req.evt_driven_valid = true;
> +	req.evt_driven = SSCTL_SSR_EVENT_FORCED;
> +
> +	ret = qmi_send_request(&sysmon->qmi, &sysmon->ssctl, &txn,
> +			       SSCTL_SUBSYS_EVENT_REQ, 40,
> +			       ssctl_subsys_event_req_ei, &req);
> +	if (ret < 0) {
> +		dev_err(sysmon->dev, "failed to send shutdown request\n");
> +		qmi_txn_cancel(&txn);
> +		return;
> +	}
> +
> +	ret = qmi_txn_wait(&txn, 5 * HZ);
> +	if (ret < 0)
> +		dev_err(sysmon->dev, "failed receiving QMI response\n");
> +	else if (resp.resp.result)
> +		dev_err(sysmon->dev, "ssr event send failed\n");
> +	else
> +		dev_dbg(sysmon->dev, "ssr event send completed\n");
> +}

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2017-11-16 20:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-15 20:10 [PATCH v3 0/5] In-kernel QMI helpers and sysmon Bjorn Andersson
2017-11-15 20:10 ` [PATCH v3 1/5] soc: qcom: Introduce QMI encoder/decoder Bjorn Andersson
2017-11-16  5:42   ` Bjorn Andersson
2017-11-16 18:57     ` Chris Lew
2017-11-16 12:10   ` Srinivas Kandagatla
2017-11-17  6:10     ` Bjorn Andersson
2017-11-15 20:10 ` [PATCH v3 2/5] soc: qcom: Introduce QMI helpers Bjorn Andersson
2017-11-16 12:11   ` Srinivas Kandagatla
2017-11-17  6:30     ` Bjorn Andersson
2017-11-18  2:11   ` Chris Lew
2017-11-21 22:42     ` Bjorn Andersson
2017-11-15 20:10 ` [PATCH v3 3/5] remoteproc: Pass type of shutdown to subdev remove Bjorn Andersson
2017-11-15 20:10 ` [PATCH v3 4/5] remoteproc: qcom: Introduce sysmon Bjorn Andersson
2017-11-16 20:05   ` Chris Lew [this message]
2017-11-17  5:58     ` Bjorn Andersson
2017-11-18  1:27       ` Chris Lew
2017-11-15 20:10 ` [PATCH v3 5/5] samples: Introduce Qualcomm QMI sample client Bjorn Andersson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0ab5497e-94b4-6450-d680-14f002188714@codeaurora.org \
    --to=clew@codeaurora.org \
    --cc=andy.gross@linaro.org \
    --cc=aneela@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=runminw@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox