Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 169986
b: refs/heads/master
c: ce7c427
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Ingo Molnar committed Nov 4, 2009
1 parent 1d470e7 commit 8c13a19
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: a489ca355efaf9efa4990b0f8f30ab650a206273
refs/heads/master: ce7c42710e2dd133f10b7fc9ed9c73bdd2435f7a
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,8 @@
int unknown_nmi_panic;
int nmi_watchdog_enabled;

static cpumask_t backtrace_mask __read_mostly;
/* For reliability, we're prepared to waste bits here. */
static DECLARE_BITMAP(backtrace_mask, NR_CPUS) __read_mostly;

/* nmi_active:
* >0: the lapic NMI watchdog is active, but can be disabled
Expand Down Expand Up @@ -414,15 +415,15 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
}

/* We can be called before check_nmi_watchdog, hence NULL check. */
if (cpumask_test_cpu(cpu, &backtrace_mask)) {
if (cpumask_test_cpu(cpu, to_cpumask(backtrace_mask))) {
static DEFINE_SPINLOCK(lock); /* Serialise the printks */

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

rc = 1;
}
Expand Down Expand Up @@ -558,14 +559,14 @@ void arch_trigger_all_cpu_backtrace(void)
{
int i;

cpumask_copy(&backtrace_mask, cpu_online_mask);
cpumask_copy(to_cpumask(backtrace_mask), cpu_online_mask);

printk(KERN_INFO "sending NMI to all CPUs:\n");
apic->send_IPI_all(NMI_VECTOR);

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

0 comments on commit 8c13a19

Please sign in to comment.