Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47195d57 authored by Don Zickus's avatar Don Zickus Committed by Ingo Molnar
Browse files

nmi_watchdog: Clean up various small details



Mostly copy/paste whitespace damage with a couple of nitpicks by
the checkpatch script. Fix the struct definition as requested by Ingo too.

Signed-off-by: default avatarDon Zickus <dzickus@redhat.com>
Cc: peterz@infradead.org
Cc: gorcunov@gmail.com
Cc: aris@redhat.com
LKML-Reference: <1266880143-24943-1-git-send-email-dzickus@redhat.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
--
 arch/x86/kernel/apic/hw_nmi.c |   14 +++++------
 arch/x86/kernel/traps.c       |    6 ++--
 include/linux/nmi.h           |    2 -
 kernel/nmi_watchdog.c         |   51 ++++++++++++++++++++----------------------
 4 files changed, 36 insertions(+), 37 deletions(-)
parent 2cc4452b
Loading
Loading
Loading
Loading
+25 −26
Original line number Diff line number Diff line
@@ -97,12 +97,11 @@ void wd_overflow(struct perf_event *event, int nmi,
		 */
		per_cpu(alert_counter, cpu) += 1;
		if (per_cpu(alert_counter, cpu) == 5) {
			if (panic_on_timeout) {
			if (panic_on_timeout)
				panic("NMI Watchdog detected LOCKUP on cpu %d", cpu);
			} else {
			else
				WARN(1, "NMI Watchdog detected LOCKUP on cpu %d", cpu);
		}
		}
	} else {
		per_cpu(alert_counter, cpu) = 0;
	}
@@ -126,7 +125,7 @@ static int enable_nmi_watchdog(int cpu)
		event = perf_event_create_kernel_counter(wd_attr, cpu, -1, wd_overflow);
		if (IS_ERR(event)) {
			/* hardware doesn't exist or not supported, fallback to software events */
			printk("nmi_watchdog: hardware not available, trying software events\n");
			printk(KERN_INFO "nmi_watchdog: hardware not available, trying software events\n");
			wd_attr = &wd_sw_attr;
			wd_attr->sample_period = NSEC_PER_SEC;
			event = perf_event_create_kernel_counter(wd_attr, cpu, -1, wd_overflow);
@@ -182,7 +181,7 @@ int proc_nmi_enabled(struct ctl_table *table, int write,
	if (nmi_watchdog_enabled) {
		for_each_online_cpu(cpu)
			if (enable_nmi_watchdog(cpu)) {
				printk("NMI watchdog failed configuration, "
				printk(KERN_ERR "NMI watchdog failed configuration, "
					" can not be enabled\n");
			}
	} else {
+1 −1

File changed.

Contains only whitespace changes.

+7 −7

File changed.

Contains only whitespace changes.

+3 −3

File changed.

Contains only whitespace changes.