aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjorn Andersson <bjorn.andersson@linaro.org>2019-07-15 22:42:33 -0700
committerJulan Hsu <julanhsu@google.com>2019-08-21 15:28:35 +0000
commiteaf776a62d7c5129e607cc5a627d9e242da2a8fe (patch)
treefc14ff610ba042b9338714f8c28de2a8c2c0ecac
parent6563bea593caa83ef0294ffaa71d5c97d4bbba60 (diff)
CHROMIUM: WAR: remoteproc: qcom: Move glink_ssr notification after stop
glink_ssr is used to signal a remote processor "A" about the stopping of another remote processor "B", so that in the event that remote processor B is ever booted again the fifos of the glink channel between A and B is in a known state. But if remote processor A receives this notification before B is actually stopped the newly reset fifo indices will be interpreted as there being "data" on the channel and either side of the channel will enter a fatal error handler. Move the glink_ssr notification to the "unprepare" state of the rproc_subdev to avoid this issue. This has the side effect of us not notifying the dying remote processor itself about its fate, which has been seen to block in certain resource constraint scenarios. BUG=b:136289132 TEST=stop and start remote proc1 using sysfs Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Mayank Chopra <mak.chopra@codeaurora.org> (cherry picked from commit 0bbbc1fdd8d66c3fd0afdd11c94b2cc247cba485 https://github.com/ldts/qualcomm-lt-kernel/commits/chromiumos-4.14-iommu-mmap-for-next) Signed-off-by: Abhinav Asati <asatiabhi@codeaurora.org> Change-Id: Ifb09b7543803b94e1133fbc9b002105dfba16e76 Signed-off-by: Vamsi Singamsetty <vamssi@codeaurora.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1724470 Reviewed-by: Julan Hsu <julanhsu@google.com> Tested-by: Julan Hsu <julanhsu@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
-rw-r--r--drivers/remoteproc/qcom_common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/remoteproc/qcom_common.c b/drivers/remoteproc/qcom_common.c
index 24d89bb7c5fc..aa30ff70b318 100644
--- a/drivers/remoteproc/qcom_common.c
+++ b/drivers/remoteproc/qcom_common.c
@@ -208,7 +208,7 @@ void qcom_unregister_ssr_notifier(struct notifier_block *nb)
}
EXPORT_SYMBOL_GPL(qcom_unregister_ssr_notifier);
-static void ssr_notify_stop(struct rproc_subdev *subdev, bool crashed)
+static void ssr_notify_unprepare(struct rproc_subdev *subdev)
{
struct qcom_rproc_ssr *ssr = to_ssr_subdev(subdev);
@@ -228,7 +228,7 @@ void qcom_add_ssr_subdev(struct rproc *rproc, struct qcom_rproc_ssr *ssr,
const char *ssr_name)
{
ssr->name = ssr_name;
- ssr->subdev.stop = ssr_notify_stop;
+ ssr->subdev.unprepare = ssr_notify_unprepare;
rproc_add_subdev(rproc, &ssr->subdev);
}