06 Aug, 2020
1 commit
-
Add module parameters 'soft_reboot_cmd' and 'soft_active_on_boot' for
customizing softdog configuration; config reboot command by assigning
soft_reboot_cmd, and set soft_active_on_boot to start up softdog
timer at module initialization stage.Signed-off-by: Woody Lin
Reviewed-by: Guenter Roeck
Link: https://lore.kernel.org/r/20200708083218.3157213-1-woodylin@google.com
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
09 Jul, 2019
1 commit
-
This gets rid of the unnecessary license boilerplate, and avoids
having to deal with individual patches one by one.No functional changes.
Reviewed-by: Jerry Hoemann
Acked-by: Sylvain Lemieux
Reviewed-by: Matthias Brugger
Acked-by: William Breathitt Gray
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
01 Mar, 2017
1 commit
-
Checking for timer expiration is done from the softirq TIMER_SOFTIRQ.
Since commit 4cd13c21b207 ("softirq: Let ksoftirqd do its job"),
pending softirqs are no longer always handled immediately, instead,
if there are pending softirqs, and ksoftirqd is in state TASK_RUNNING,
the handling of the softirqs are deferred, and are instead supposed
to be handled by ksoftirqd, when ksoftirqd gets scheduled.If a user space process with a real-time policy starts to misbehave
by never relinquishing the CPU while ksoftirqd is in state TASK_RUNNING,
what will happen is that all softirqs will get deferred, while ksoftirqd,
which is supposed to handle the deferred softirqs, will never get to run.To make sure that the watchdog is able to fire even when we do not get
to run softirqs, replace the timers with hrtimers.Signed-off-by: Niklas Cassel
Signed-off-by: Guenter Roeck
25 Feb, 2017
1 commit
-
It occurred to me that the panic pretimeout governor will stall the
softdog, because it is purely software which simply breaks when the
kernel panics. Testing governors with the softdog on the other hand is
really useful, so make this feature a compile time option which nees to
be enabled explicitly. This also removes the overhead if pretimeout
support is not used because it will now be compiled away (saving ~10% on
ARM32).Signed-off-by: Wolfram Sang
Reviewed-by: Vladimir Zapolskiy
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
08 Oct, 2016
1 commit
-
Give devices which do not have hardware support for pretimeout at least a
software version of it.Signed-off-by: Wolfram Sang
Signed-off-by: Vladimir Zapolskiy
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
24 Sep, 2016
1 commit
-
Check for watchdog_ops structures that are only stored in the ops field of
a watchdog_device structure. This field is declared const, so watchdog_ops
structures that have this property can be declared as const also.The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)//
@r disable optional_qualifier@
identifier i;
position p;
@@
static struct watchdog_ops i@p = { ... };@ok@
identifier r.i;
struct watchdog_device e;
position p;
@@
e.ops = &i@p;@bad@
position p != {r.p,ok.p};
identifier r.i;
struct watchdog_ops e;
@@
e@i@p@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
struct watchdog_ops i = { ... };
//Signed-off-by: Julia Lawall
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
18 Jul, 2016
7 commits
-
Signed-off-by: Wolfram Sang
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
If we leave set_timeout empty, the core will do exactly what is
implemented here anyway.Signed-off-by: Wolfram Sang
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Signed-off-by: Wolfram Sang
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Signed-off-by: Wolfram Sang
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
And move module_init/exit to the proper place while here.
Signed-off-by: Wolfram Sang
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
Error string and comment say we fall back to a default, but in reality
we bailed out. Refactor the code to use the core helper which then
matches the described behaviour. While updating the init message anyhow,
shorten it while we are here; no need for versioning there as well and
the name is already given via pr_fmt.Signed-off-by: Wolfram Sang
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck -
The history is obsolete, especially since we switched to watchdog
framework. The section markers also don't make sense anymore given
the small size of the driver.Signed-off-by: Wolfram Sang
Reviewed-by: Guenter Roeck
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
28 Dec, 2015
1 commit
-
the softdog has static variables which are accessed if its timer is
still running after the driver is unloaded. and lead to crash:$modprobe softdog
$echo 1 >/dev/watchdog
$modprobe -r softdogCPU 20 Unable to handle kernel paging request at virtual address
Oops[#1]:
CPU: 20 PID: 0 Comm: swapper/20 Not tainted 4.1.13-WR8.0.0.0_standard
...
Modules linked in: [last unloaded: softdog]
....
Call Trace:
[] cascade+0x34/0xb0
[] run_timer_softirq+0x30c/0x368
[] __do_softirq+0x1ec/0x418
[] irq_exit+0x90/0x98
[] plat_irq_dispatch+0xa4/0x140
[] ret_from_irq+0x0/0x4
[] __r4k_wait+0x20/0x40
[] cpu_startup_entry+0x2a0/0x368
[] start_secondary+0x444/0x4d8add the module ref when timer is running to avoid to unload the softdog
moduleSigned-off-by: Li RongQing
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
13 Dec, 2015
1 commit
-
Get rid of the custom reboot notifier block registration and use the one
provided by the watchdog core.Signed-off-by: Damien Riegel
Reviewed-by: Guenter Roeck
Reviewed-by: Vivien Didelot
Signed-off-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
31 Mar, 2014
1 commit
-
Fix the following checkpatch warnings and error:
WARNING: quoted string split across lines
WARNING: braces {} are not necessary for single statement blocks
WARNING: __initdata should be placed after ibmasr_id_table[]
WARNING: please, no space before tabs
ERROR: do not initialise statics to 0 or NULLSigned-off-by: Jingoo Han
Reviewed-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
10 Dec, 2013
1 commit
-
After commit 487722cf2 (watchdog: Get rid of MODULE_ALIAS_MISCDEV
statements) the affected drivers no longer need to include miscdevice.h.
Only exception is rt2880_wdt.c which never needed it.Signed-off-by: Guenter Roeck
Reviewed-by: Jean Delvare
Signed-off-by: Wim Van Sebroeck
18 Nov, 2013
1 commit
-
I just can't find any value in MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR)
and MODULE_ALIAS_MISCDEV(TEMP_MINOR) statements.Either the device is enumerated and the driver already has a module
alias (e.g. PCI, USB etc.) that will get the right driver loaded
automatically.Or the device is not enumerated and loading its driver will lead to
more or less intrusive hardware poking. Such hardware poking should be
limited to a bare minimum, so the user should really decide which
drivers should be tried and in what order. Trying them all in
arbitrary order can't do any good.On top of that, loading that many drivers at once bloats the kernel
log. Also many drivers will stay loaded afterward, bloating the output
of "lsmod" and wasting memory. Some modules (cs5535_mfgpt which gets
loaded as a dependency) can't even be unloaded!If defining char-major-10-130 is needed then it should happen in
user-space.Signed-off-by: Jean Delvare
Acked-by: Guenter Roeck
Signed-off-by: Wim Van Sebroeck
Cc: Stephen Warren
Cc: Mike Frysinger
Cc: Wan ZongShun
Cc: Ben Dooks
Cc: Kukjin Kim
Cc: Zwane Mwaikambo
Cc: Jim Cromie
12 Jul, 2013
1 commit
-
In watchdog_ping(), 'start' is called automatically when 'ping' function call
is not configured.
Softdog driver has same handling in both cases - start and ping, so 'ping' OPS
can be removed.Signed-off-by: Milo(Woogyom) Kim
Signed-off-by: Wim Van Sebroeck
28 Mar, 2012
3 commits
-
Convert softdog.c to the new watchdog API.
Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck -
nowayout is actually a boolean value.
So make it bool for all watchdog device drivers.Signed-off-by: Wim Van Sebroeck
-
Use the current logging styles.
Make sure all output has a prefix.
Add missing newlines.
Remove now unnecessary PFX, NAME, and miscellaneous other #defines.
Coalesce formats.Signed-off-by: Joe Perches
Signed-off-by: Wim Van Sebroeck
29 Mar, 2011
1 commit
-
This is needed for determining the reason for failure when a softdog
timeout occurs.We use softdog to watch for critical application failures and at the
minimum a snapshot of the system would help to determine the cause. In
such a scenario the application could fail but there isn't a softlockup as
such, hence the detect softlockup feature does not help.The patch adds a module parameter soft_panic which when set to 1 causes
softdog to invoke panic instead of reboot when the softdog timer expires.
By invoking panic we execute kdump if it is configured and the vmcore
generated by kdump should provide atleast a minimal idea of the reason for
failure.Based on an original patch by Ken Sugawara
Signed-off-by: Anithra P J
Reviewed-by: WANG Cong
Acked-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
Signed-off-by: Andrew Morton
16 Mar, 2011
1 commit
-
cleanup spaces before tabs in drivers/watchdog/
Signed-off-by: Wim Van Sebroeck
18 Jun, 2009
1 commit
-
Clean-up the watchdog drivers so that checkpatch.pl get's happy...
Signed-off-by: Wim Van Sebroeck
25 Mar, 2009
1 commit
-
Some more cleaning-up of the watchdog drivers.
Signed-off-by: Wim Van Sebroeck
29 Oct, 2008
1 commit
-
Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
06 Aug, 2008
1 commit
-
This brings the watchdog drivers into line with coding style.
This patch takes cares of the indentation as described in chapter 1.
Main changes:
* Re-structure the ioctl switch call for all drivers as follows:
switch (cmd) {
case WDIOC_GETSUPPORT:
case WDIOC_GETSTATUS:
case WDIOC_GETBOOTSTATUS:
case WDIOC_GETTEMP:
case WDIOC_SETOPTIONS:
case WDIOC_KEEPALIVE:
case WDIOC_SETTIMEOUT:
case WDIOC_GETTIMEOUT:
case WDIOC_GETTIMELEFT:
default:
}This to make the migration from the drivers to the uniform watchdog
device driver easier in the future.Signed-off-by: Wim Van Sebroeck
21 Jun, 2008
1 commit
-
Review and switch to unlocked_ioctl
Signed-off-by: Alan Cox
Signed-off-by: Wim Van Sebroeck
18 Oct, 2007
1 commit
-
move watchdog tree from drivers/char/watchdog to drivers/watchdog.
Signed-off-by: Wim Van Sebroeck