lkml.org 
[lkml]   [2017]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 4/5] remoteproc: qcom: Introduce sysmon
From
Date
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
\
 
 \ /
  Last update: 2017-11-17 17:18    [W:0.114 / U:1.552 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site