diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-12 17:19:01 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-12 17:20:33 -0400 |
commit | a9aa1d02de36b450990b0e25a88fc2ff1c3e6b94 (patch) | |
tree | 1f9d19f1642d263e65906a916a48be9339accc73 /arch/x86/kernel/apic/nmi.c | |
parent | 5671a10e2bc7f99d9157c6044faf8be2ef302361 (diff) | |
parent | b57f95a38233a2e73b679bea4a5453a1cc2a1cc9 (diff) |
Merge commit 'v2.6.34-rc7' into perf/nmi
Merge reason: catch up with latest softlockup detector changes.
Diffstat (limited to 'arch/x86/kernel/apic/nmi.c')
-rw-r--r-- | arch/x86/kernel/apic/nmi.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/arch/x86/kernel/apic/nmi.c b/arch/x86/kernel/apic/nmi.c index 5d47682f580b..a43f71cb30f8 100644 --- a/arch/x86/kernel/apic/nmi.c +++ b/arch/x86/kernel/apic/nmi.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/delay.h> | 18 | #include <linux/delay.h> |
19 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
20 | #include <linux/module.h> | 20 | #include <linux/module.h> |
21 | #include <linux/slab.h> | ||
21 | #include <linux/sysdev.h> | 22 | #include <linux/sysdev.h> |
22 | #include <linux/sysctl.h> | 23 | #include <linux/sysctl.h> |
23 | #include <linux/percpu.h> | 24 | #include <linux/percpu.h> |
@@ -177,7 +178,7 @@ int __init check_nmi_watchdog(void) | |||
177 | error: | 178 | error: |
178 | if (nmi_watchdog == NMI_IO_APIC) { | 179 | if (nmi_watchdog == NMI_IO_APIC) { |
179 | if (!timer_through_8259) | 180 | if (!timer_through_8259) |
180 | disable_8259A_irq(0); | 181 | legacy_pic->chip->mask(0); |
181 | on_each_cpu(__acpi_nmi_disable, NULL, 1); | 182 | on_each_cpu(__acpi_nmi_disable, NULL, 1); |
182 | } | 183 | } |
183 | 184 | ||
@@ -409,13 +410,13 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) | |||
409 | 410 | ||
410 | /* We can be called before check_nmi_watchdog, hence NULL check. */ | 411 | /* We can be called before check_nmi_watchdog, hence NULL check. */ |
411 | if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) { | 412 | if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) { |
412 | static DEFINE_SPINLOCK(lock); /* Serialise the printks */ | 413 | static DEFINE_RAW_SPINLOCK(lock); /* Serialise the printks */ |
413 | 414 | ||
414 | spin_lock(&lock); | 415 | raw_spin_lock(&lock); |
415 | printk(KERN_WARNING "NMI backtrace for cpu %d\n", cpu); | 416 | printk(KERN_WARNING "NMI backtrace for cpu %d\n", cpu); |
416 | show_regs(regs); | 417 | show_regs(regs); |
417 | dump_stack(); | 418 | dump_stack(); |
418 | spin_unlock(&lock); | 419 | raw_spin_unlock(&lock); |
419 | cpumask_clear_cpu(cpu, to_cpumask(backtrace_mask)); | 420 | cpumask_clear_cpu(cpu, to_cpumask(backtrace_mask)); |
420 | 421 | ||
421 | rc = 1; | 422 | rc = 1; |
@@ -431,8 +432,8 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) | |||
431 | * Ayiee, looks like this CPU is stuck ... | 432 | * Ayiee, looks like this CPU is stuck ... |
432 | * wait a few IRQs (5 seconds) before doing the oops ... | 433 | * wait a few IRQs (5 seconds) before doing the oops ... |
433 | */ | 434 | */ |
434 | __this_cpu_inc(per_cpu_var(alert_counter)); | 435 | __this_cpu_inc(alert_counter); |
435 | if (__this_cpu_read(per_cpu_var(alert_counter)) == 5 * nmi_hz) | 436 | if (__this_cpu_read(alert_counter) == 5 * nmi_hz) |
436 | /* | 437 | /* |
437 | * die_nmi will return ONLY if NOTIFY_STOP happens.. | 438 | * die_nmi will return ONLY if NOTIFY_STOP happens.. |
438 | */ | 439 | */ |
@@ -440,7 +441,7 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason) | |||
440 | regs, panic_on_timeout); | 441 | regs, panic_on_timeout); |
441 | } else { | 442 | } else { |
442 | __get_cpu_var(last_irq_sum) = sum; | 443 | __get_cpu_var(last_irq_sum) = sum; |
443 | __this_cpu_write(per_cpu_var(alert_counter), 0); | 444 | __this_cpu_write(alert_counter, 0); |
444 | } | 445 | } |
445 | 446 | ||
446 | /* see if the nmi watchdog went off */ | 447 | /* see if the nmi watchdog went off */ |