History

watchdog: Improve initialisation error message and documentation

The error message 'NMI watchdog failed to create perf event...' does not make it clear that this is a fatal error for the watchdog. It also currently prints the error value as a pointer, rather than extracting the error code with PTR_ERR(). Fix that. Add a note to the description of the 'nowatchdog' kernel parameter to associate it with this message.

Ben Hutchings committed 15 years ago

Commit 55142371 parent b518a642 files · +3 −2Browse files

Unified · Split

2 files
  1. Documentation/kernel-parameters.txt +1 −1
  2. kernel/watchdog.c +2 −1
Documentation/kernel-parameters.txt+1−1
@@ -1759,7 +1759,7 @@ and is between 256 and 4096 characters. It is defined in the file · 1758 unmodified lines
17591759
17601760 nousb [USB] Disable the USB subsystem
17611761
1762− nowatchdog [KNL] Disable the lockup detector.
1762+ nowatchdog [KNL] Disable the lockup detector (NMI watchdog).
17631763
17641764 nowb [ARM]
17651765
kernel/watchdog.c+2−1
@@ -364,7 +364,8 @@ static int watchdog_nmi_enable(int cpu) · 363 unmodified lines
364364 goto out_save;
365365 }
366366
367− printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event);
367+ printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
368+ cpu, PTR_ERR(event));
368369 return PTR_ERR(event);
369370
370371 /* success path */