From d1d5c9c42a862d47451c90adad01faab0ffc79c6 Mon Sep 17 00:00:00 2001 From: Gokul krishna Krishnakumar Date: Thu, 30 Sep 2021 09:59:43 -0700 Subject: [PATCH] remoteproc: qcom: Add notification timeout If the notification clients are taking too long or are stuck somewhere we want to be notified of such problems. This change adds the notification timeout logic that either causes a panic or dumps the stack when a timeout occurs. Change-Id: Ifaa7e20a697f920ffffd7345c9794d39a718f9b0 Signed-off-by: Gokul krishna Krishnakumar [quic_gurus@quicinc.com: Fix Minor merge conflict] Signed-off-by: Guru Das Srinagesh --- drivers/remoteproc/Kconfig | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/drivers/remoteproc/Kconfig b/drivers/remoteproc/Kconfig index 166019786653..e9c43909e219 100644 --- a/drivers/remoteproc/Kconfig +++ b/drivers/remoteproc/Kconfig @@ -298,6 +298,33 @@ config RCAR_REMOTEPROC This can be either built-in or a loadable module. If compiled as module (M), the module name is rcar_rproc. +config QCOM_PANIC_ON_NOTIF_TIMEOUT + bool "Trigger kernel panic when notification timeout expires" + help + This is a debug feature where a kernel panic is triggered when + communication between subsystems through sysmon is taking too + long. This scneario can happen if the peripheral has died and + is no longer responsive. + Also trigger a kernel panic if invoking the callbacks registered + with a particular subsystem's notifications by the subsystem + notifier framework is taking too long. + +config RPROC_SYSMON_NOTIF_TIMEOUT + int "Sysmon notifications timeout in ms" + default 10000 + help + The amount of time, in milliseconds, that should elapse between + the start and end of sysmon notifications, before a warning + is emitted. + +config RPROC_SSR_NOTIF_TIMEOUT + int "SSR notifier timeout in ms" + default 10000 + help + The amount of time, in milliseconds, that should elapse between + the start and end of SSR notifications through the subsystem + notifier, before a warning is emitted. + config ST_REMOTEPROC tristate "ST remoteproc support" depends on ARCH_STI