Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140543
b: refs/heads/master
c: fcef857
h: refs/heads/master
i:
  140541: ca4613f
  140539: c49d1a4
  140535: ef9e95a
  140527: fea1104
  140511: 56ddcb7
  140479: 91a9e13
  140415: 3799523
  140287: 5cc369f
v: v3
  • Loading branch information
Rusty Russell committed Mar 13, 2009
1 parent 4da31e1 commit 5428660
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc9b83dd1f66402b870301c3c7117b9c1484abb4
refs/heads/master: fcef8576d8a64fc603e719c97d423f9f6d4e0e8b
11 changes: 6 additions & 5 deletions trunk/arch/x86/kernel/apic/nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
int unknown_nmi_panic;
int nmi_watchdog_enabled;

static cpumask_t backtrace_mask = CPU_MASK_NONE;
static cpumask_var_t backtrace_mask;

/* nmi_active:
* >0: the lapic NMI watchdog is active, but can be disabled
Expand Down Expand Up @@ -138,6 +138,7 @@ int __init check_nmi_watchdog(void)
if (!prev_nmi_count)
goto error;

alloc_cpumask_var(&backtrace_mask, GFP_KERNEL);
printk(KERN_INFO "Testing NMI watchdog ... ");

#ifdef CONFIG_SMP
Expand Down Expand Up @@ -413,14 +414,14 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
touched = 1;
}

if (cpu_isset(cpu, backtrace_mask)) {
if (cpumask_test_cpu(cpu, backtrace_mask)) {
static DEFINE_SPINLOCK(lock); /* Serialise the printks */

spin_lock(&lock);
printk(KERN_WARNING "NMI backtrace for cpu %d\n", cpu);
dump_stack();
spin_unlock(&lock);
cpu_clear(cpu, backtrace_mask);
cpumask_clear_cpu(cpu, backtrace_mask);
}

/* Could check oops_in_progress here too, but it's safer not to */
Expand Down Expand Up @@ -554,10 +555,10 @@ void __trigger_all_cpu_backtrace(void)
{
int i;

backtrace_mask = cpu_online_map;
cpumask_copy(backtrace_mask, cpu_online_mask);
/* Wait for up to 10 seconds for all CPUs to do the backtrace */
for (i = 0; i < 10 * 1000; i++) {
if (cpus_empty(backtrace_mask))
if (cpumask_empty(backtrace_mask))
break;
mdelay(1);
}
Expand Down

0 comments on commit 5428660

Please sign in to comment.