c07fa41c492147bf67c3fc21d5c89d9073151ed7
[openembedded.git] /
1 From 551423748a4eba55f2eb0fc250d757986471f187 Mon Sep 17 00:00:00 2001
2 From: Ben Hutchings <ben@decadent.org.uk>
3 Date: Sun, 2 Jan 2011 23:02:42 +0000
4 Subject: [PATCH 46/66] watchdog: Improve initialisation error message and documentation
5
6 The error message 'NMI watchdog failed to create perf event...'
7 does not make it clear that this is a fatal error for the
8 watchdog.  It also currently prints the error value as a
9 pointer, rather than extracting the error code with PTR_ERR().
10 Fix that.
11
12 Add a note to the description of the 'nowatchdog' kernel
13 parameter to associate it with this message.
14
15 Reported-by: Cesare Leonardi <celeonar@gmail.com>
16 Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
17 Cc: 599368@bugs.debian.org
18 Cc: 608138@bugs.debian.org
19 Cc: Don Zickus <dzickus@redhat.com>
20 Cc: Frederic Weisbecker <fweisbec@gmail.com>
21 Cc: <stable@kernel.org> # .37.x and later
22 LKML-Reference: <1294009362.3167.126.camel@localhost>
23 Signed-off-by: Ingo Molnar <mingo@elte.hu>
24 ---
25  Documentation/kernel-parameters.txt |    2 +-
26  kernel/watchdog.c                   |    3 ++-
27  2 files changed, 3 insertions(+), 2 deletions(-)
28
29 diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
30 index 8b61c93..01ece1b 100644
31 --- a/Documentation/kernel-parameters.txt
32 +++ b/Documentation/kernel-parameters.txt
33 @@ -1759,7 +1759,7 @@ and is between 256 and 4096 characters. It is defined in the file
34  
35         nousb           [USB] Disable the USB subsystem
36  
37 -       nowatchdog      [KNL] Disable the lockup detector.
38 +       nowatchdog      [KNL] Disable the lockup detector (NMI watchdog).
39  
40         nowb            [ARM]
41  
42 diff --git a/kernel/watchdog.c b/kernel/watchdog.c
43 index 6e3c41a..5b08215 100644
44 --- a/kernel/watchdog.c
45 +++ b/kernel/watchdog.c
46 @@ -364,7 +364,8 @@ static int watchdog_nmi_enable(int cpu)
47                 goto out_save;
48         }
49  
50 -       printk(KERN_ERR "NMI watchdog failed to create perf event on cpu%i: %p\n", cpu, event);
51 +       printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event: %ld\n",
52 +              cpu, PTR_ERR(event));
53         return PTR_ERR(event);
54  
55         /* success path */
56 -- 
57 1.6.6.1
58