summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2017-06-23 23:07:22 +0000
committerJohannes Weiner <hannes@cmpxchg.org>2017-06-23 23:07:22 +0000
commita4a6db99e821a1552947f5f9ef1a57021e4fe398 (patch)
treef685b2d08220c149f1abd9df184d6ef97066e656
parent42c8cbc2d31d56f10a67b57d4744c190cdd14d1d (diff)
watchdog-provide-watchdog_reconfigure-for-arch-watchdogs-fix
add code comments Link: http://lkml.kernel.org/r/20170617125933.774d3858@roar.ozlabs.ibm.com Cc: Don Zickus <dzickus@redhat.com> Cc: Babu Moger <babu.moger@oracle.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Paul Mackerras <paulus@samba.org> Cc: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r--kernel/watchdog.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 06cd965f64d2..36531025496f 100644
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -114,6 +114,10 @@ int __read_mostly watchdog_suspended;
/*
* These functions can be overridden if an architecture implements its
* own hardlockup detector.
+ *
+ * watchdog_nmi_enable/disable can be implemented to start and stop when
+ * softlockup watchdog threads start and stop. The arch must select the
+ * SOFTLOCKUP_DETECTOR Kconfig.
*/
int __weak watchdog_nmi_enable(unsigned int cpu)
{
@@ -123,6 +127,17 @@ void __weak watchdog_nmi_disable(unsigned int cpu)
{
}
+/*
+ * watchdog_nmi_reconfigure can be implemented to be notified after any
+ * watchdog configuration change. The arch hardlockup watchdog should
+ * respond to the following variables:
+ * - nmi_watchdog_enabled
+ * - watchdog_thresh
+ * - watchdog_cpumask
+ * - sysctl_hardlockup_all_cpu_backtrace
+ * - hardlockup_panic
+ * - watchdog_suspended
+ */
void __weak watchdog_nmi_reconfigure(void)
{
}