Message ID | 20171115201012.25892-1-bjorn.andersson@linaro.org |
---|---|
Headers | show |
Series | In-kernel QMI helpers and sysmon | expand |
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 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu 16 Nov 12:05 PST 2017, Chris Lew wrote: > > + 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. > We could easily add support here to send out the AFTER_BOOTUP notification, beyond that we would need to extend the subdev notifiers as well. But the downstream code paths does confuse me, can you confirm that these messages are actually sent to the remote ssctl services? Regards, Bjorn -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/16/2017 9:58 PM, Bjorn Andersson wrote: > On Thu 16 Nov 12:05 PST 2017, Chris Lew wrote: >>> + 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. >> > > We could easily add support here to send out the AFTER_BOOTUP > notification, beyond that we would need to extend the subdev notifiers > as well. > > But the downstream code paths does confuse me, can you confirm that > these messages are actually sent to the remote ssctl services? > > Regards, > Bjorn > Yea the other three events are definitely sent to the remote. The remote side posts the events for other modules to query. I'm not sure if all of the events are used by other other modules though. Thanks, Chris -- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html