Skip to contentSkip to conversation

remoteproc: qcom: Add notification timeouts

PATCH New Rishabh Bhatnagar 1 participant 1 message Oct 30, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remoteproc: qcom: Add notification timeouts

Clients can register their callbacks for power-on/off notifications of remote processors. While executing the notifier chain sometimes these callbacks may get stuck or take a long time which is not desired. To detect such cases this patch introduces a timeout and prints out a warning indicating that notifier chain is taking a long time. The timeout is set to 20secs by default and can be adjusted.

---
 drivers/remoteproc/Kconfig       | 16 ++++++++++++++++
 drivers/remoteproc/qcom_common.c | 41 ++++++++++++++++++++++++++++++++--------
 2 files changed, 49 insertions(+), 8 deletions(-)
drivers/remoteproc/Kconfig +16 -0
index d99548f..e1e623e 100644
@@ -234,6 +234,22 @@ config QCOM_WCNSS_PIL
 	  Say y here to support the Peripheral Image Loader for the Qualcomm
 	  Wireless Connectivity Subsystem.
 
+config QCOM_NOTIFY_TIMEOUT
+	int "Default timeout for ssr notifications to complete (in milliseconds)"
+	depends on QCOM_RPROC_COMMON
+	default 20000
+	help
+	  As part of ssr notification clients can register their callbacks
+	  to a notifier chain which is invoked whenever the remoteproc
+	  powers-on/off. This option controls the timeout for ssr notifications
+	  to complete.
+	  This is a good to have debug feature as sometimes callbacks
+	  can get stuck or take a long time. This feature helps in identifying
+	  such scenarios.
+
+	  The default value is kept as 20 secs and should be left as it is
+	  in most cases.
+
 config ST_REMOTEPROC
 	tristate "ST remoteproc support"
 	depends on ARCH_STI
drivers/remoteproc/qcom_common.c +33 -8

89 lines not on this page · raw message

Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project