author | Rasmus Villemoes <rasmus.villemoes@prevas.dk> | |
Wed, 14 Apr 2021 07:18:22 +0000 (09:18 +0200) | ||
committer | Stefan Roese <sr@denx.de> | |
Wed, 28 Apr 2021 08:05:13 +0000 (10:05 +0200) | ||
commit | 17bd5cce7e25499bda4ad7862b2335098c4c5a54 | |
tree | 0fbfcea7cb96a5274b8af5556f17f048ccb77e87 | tree | snapshot (tar.xz tar.gz zip) |
parent | f9fb4c462b0948ce7f964b538bcc6c0e35cdaf27 | commit | diff |
allow opting out of WATCHDOG_RESET() from timer interrupt
Having WATCHDOG_RESET() called automatically from the timer interrupt
runs counter to the idea of a watchdog device - if the board runs into
an infinite loops with interrupts still enabled, the watchdog will
never fire.
When using CONFIG_(SPL_)WDT, the watchdog_reset function is a lot more
complicated than just poking a few SOC-specific registers - it
involves accessing all kinds of global data, and if the interrupt
happens at the wrong time (say, in the middle of an WATCHDOG_RESET()
call from ordinary code), that can end up corrupting said global data.
Allow the board to opt out of calling WATCHDOG_RESET() from the timer
interrupt handler by setting CONFIG_SYS_WATCHDOG_FREQ to 0 - as that
setting is currently nonsensical (it would be compile-time
divide-by-zero), it cannot affect any existing boards.
Add documentation for both the existing and extended meaning of
CONFIG_SYS_WATCHDOG_FREQ.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Having WATCHDOG_RESET() called automatically from the timer interrupt
runs counter to the idea of a watchdog device - if the board runs into
an infinite loops with interrupts still enabled, the watchdog will
never fire.
When using CONFIG_(SPL_)WDT, the watchdog_reset function is a lot more
complicated than just poking a few SOC-specific registers - it
involves accessing all kinds of global data, and if the interrupt
happens at the wrong time (say, in the middle of an WATCHDOG_RESET()
call from ordinary code), that can end up corrupting said global data.
Allow the board to opt out of calling WATCHDOG_RESET() from the timer
interrupt handler by setting CONFIG_SYS_WATCHDOG_FREQ to 0 - as that
setting is currently nonsensical (it would be compile-time
divide-by-zero), it cannot affect any existing boards.
Add documentation for both the existing and extended meaning of
CONFIG_SYS_WATCHDOG_FREQ.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
README | diff | blob | history | |
arch/m68k/lib/time.c | diff | blob | history | |
arch/powerpc/lib/interrupts.c | diff | blob | history | |
drivers/timer/mpc83xx_timer.c | diff | blob | history |