/* Arch specific watchdogs might need to share extra watchdog-related APIs. */ #ifdefined(CONFIG_HARDLOCKUP_DETECTOR_ARCH) || defined(CONFIG_HARDLOCKUP_DETECTOR_SPARC64) #include <asm/nmi.h> #endif
/* * The run state of the lockup detectors is controlled by the content of the * 'watchdog_enabled' variable. Each lockup detector has its dedicated bit - * bit 0 for the hard lockup detector and bit 1 for the soft lockup detector. * * 'watchdog_user_enabled', 'watchdog_hardlockup_user_enabled' and * 'watchdog_softlockup_user_enabled' are variables that are only used as an * 'interface' between the parameters in /proc/sys/kernel and the internal * state bits in 'watchdog_enabled'. The 'watchdog_thresh' variable is * handled differently because its value is not boolean, and the lockup * detectors are 'suspended' while 'watchdog_thresh' is equal zero.
*/ #define WATCHDOG_HARDLOCKUP_ENABLED_BIT 0 #define WATCHDOG_SOFTOCKUP_ENABLED_BIT 1 #define WATCHDOG_HARDLOCKUP_ENABLED (1 << WATCHDOG_HARDLOCKUP_ENABLED_BIT) #define WATCHDOG_SOFTOCKUP_ENABLED (1 << WATCHDOG_SOFTOCKUP_ENABLED_BIT)
/** * touch_nmi_watchdog - manually reset the hardlockup watchdog timeout. * * If we support detecting hardlockups, touch_nmi_watchdog() may be * used to pet the watchdog (reset the timeout) - for code which * intentionally disables interrupts for a long time. This call is stateless. * * Though this function has "nmi" in the name, the hardlockup watchdog might * not be backed by NMIs. This function will likely be renamed to * touch_hardlockup_watchdog() in the future.
*/ staticinlinevoid touch_nmi_watchdog(void)
{ /* * Pass on to the hardlockup detector selected via CONFIG_. Note that * the hardlockup detector may not be arch-specific nor using NMIs * and the arch_touch_nmi_watchdog() function will likely be renamed * in the future.
*/
arch_touch_nmi_watchdog();
touch_softlockup_watchdog();
}
/* * Create trigger_all_cpu_backtrace() out of the arch-provided * base function. Return whether such support was available, * to allow calling code to fall back to some other mechanism:
*/ #ifdef arch_trigger_cpumask_backtrace staticinlinebool trigger_all_cpu_backtrace(void)
{
arch_trigger_cpumask_backtrace(cpu_online_mask, -1); returntrue;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.