Skip to content

Commit

Permalink
watchdog: Improve initialisation error message and documentation
Browse files Browse the repository at this point in the history
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.

Reported-by: Cesare Leonardi <[email protected]>
Signed-off-by: Ben Hutchings <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Don Zickus <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: <[email protected]> # .37.x and later
LKML-Reference: <1294009362.3167.126.camel@localhost>
Signed-off-by: Ingo Molnar <[email protected]>
  • Loading branch information
bwhacks authored and Ingo Molnar committed Jan 3, 2011
1 parent b518a64 commit 5514237
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Documentation/kernel-parameters.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,7 @@ and is between 256 and 4096 characters. It is defined in the file

nousb [USB] Disable the USB subsystem

nowatchdog [KNL] Disable the lockup detector.
nowatchdog [KNL] Disable the lockup detector (NMI watchdog).

nowb [ARM]

Expand Down
3 changes: 2 additions & 1 deletion kernel/watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ static int watchdog_nmi_enable(int cpu)
goto out_save;
}

printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event);
printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
cpu, PTR_ERR(event));
return PTR_ERR(event);

/* success path */
Expand Down

0 comments on commit 5514237

Please sign in to comment.