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.

Reported-by: Cesare Leonardi <celeonar@gmail.com>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: 599368@bugs.debian.org
Cc: 608138@bugs.debian.org
Cc: Don Zickus <dzickus@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: <stable@kernel.org> # .37.x and later
LKML-Reference: <1294009362.3167.126.camel@localhost>
Signed-off-by: Ingo Molnar <mingo@elte.hu>

authored by Ben Hutchings and committed by Ingo Molnar 55142374 b518a649

+3 -2
+1 -1
Documentation/kernel-parameters.txt
··· 1759 1760 nousb [USB] Disable the USB subsystem 1761 1762 - nowatchdog [KNL] Disable the lockup detector. 1763 1764 nowb [ARM] 1765
··· 1759 1760 nousb [USB] Disable the USB subsystem 1761 1762 + nowatchdog [KNL] Disable the lockup detector (NMI watchdog). 1763 1764 nowb [ARM] 1765
+2 -1
kernel/watchdog.c
··· 364 goto out_save; 365 } 366 367 - printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event); 368 return PTR_ERR(event); 369 370 /* success path */
··· 364 goto out_save; 365 } 366 367 + printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n", 368 + cpu, PTR_ERR(event)); 369 return PTR_ERR(event); 370 371 /* success path */