On Fri, Feb 04, 2011 at 11:32:18PM +0100, Paul Bolle wrote:
On Fri, 2011-02-04 at 17:16 -0500, Don Zickus wrote:
> Thanks for finding this and providing the info!
You're welcome. Feel free to ask me to test the rearranged code and/or
to a add Reported-by tag to your patch.
Here is a patch I was looking to post upstream. This should address your
concerns. Let me know how it works out for you.
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index d7ebdf4..bb7887b 100644
@@ -366,8 +366,17 @@ static int watchdog_nmi_enable(int cpu)
- printk(KERN_ERR "NMI watchdog disabled for cpu%i: unable to create perf event:
- cpu, PTR_ERR(event));
+ /* vary the KERN level based on the returned errno */
+ if (PTR_ERR(event) == -EOPNOTSUPP)
+ printk(KERN_INFO "NMI watchdog disabled (cpu%i): not supported"
+ " (no LAPIC?)\n", cpu);
+ else if (PTR_ERR(event) == -ENOENT)
+ printk(KERN_WARNING "NMI watchdog disabled (cpu%i): hardware"
+ " events not enabled\n", cpu);
+ printk(KERN_ERR "NMI watchdog disabled (cpu%i): unable to create"
+ " perf event: %ld\n", cpu, PTR_ERR(event));
/* success path */