Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223972
b: refs/heads/master
c: 554ec06
h: refs/heads/master
v: v3
  • Loading branch information
Dongdong Deng authored and Ingo Molnar committed Jan 5, 2011
1 parent a7b6507 commit e16669c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ab181fa9ff73a38fccd0a4f1c40a38dfe62b535
refs/heads/master: 554ec063982752e9a569ab9189eeffa3d96731b2
13 changes: 13 additions & 0 deletions trunk/arch/x86/kernel/apic/hw_nmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,20 @@ u64 hw_nmi_get_sample_period(void)
/* For reliability, we're prepared to waste bits here. */
static DECLARE_BITMAP(backtrace_mask, NR_CPUS) __read_mostly;

/* "in progress" flag of arch_trigger_all_cpu_backtrace */
static unsigned long backtrace_flag;

void arch_trigger_all_cpu_backtrace(void)
{
int i;

if (test_and_set_bit(0, &backtrace_flag))
/*
* If there is already a trigger_all_cpu_backtrace() in progress
* (backtrace_flag == 1), don't output double cpu dump infos.
*/
return;

cpumask_copy(to_cpumask(backtrace_mask), cpu_online_mask);

printk(KERN_INFO "sending NMI to all CPUs:\n");
Expand All @@ -43,6 +53,9 @@ void arch_trigger_all_cpu_backtrace(void)
break;
mdelay(1);
}

clear_bit(0, &backtrace_flag);
smp_mb__after_clear_bit();
}

static int __kprobes
Expand Down

0 comments on commit e16669c

Please sign in to comment.