git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debug lockups: Improve lockup detection, fix generic arch fallback
[pandora-kernel.git]
/
arch
/
x86
/
kernel
/
apic
/
nmi.c
diff --git
a/arch/x86/kernel/apic/nmi.c
b/arch/x86/kernel/apic/nmi.c
index
ce4fbfa
..
db72202
100644
(file)
--- a/
arch/x86/kernel/apic/nmi.c
+++ b/
arch/x86/kernel/apic/nmi.c
@@
-39,7
+39,7
@@
int unknown_nmi_panic;
int nmi_watchdog_enabled;
int unknown_nmi_panic;
int nmi_watchdog_enabled;
-static cpumask_
var_t backtrace_mask
;
+static cpumask_
t backtrace_mask __read_mostly
;
/* nmi_active:
* >0: the lapic NMI watchdog is active, but can be disabled
/* nmi_active:
* >0: the lapic NMI watchdog is active, but can be disabled
@@
-66,7
+66,7
@@
static inline unsigned int get_nmi_count(int cpu)
static inline int mce_in_progress(void)
{
static inline int mce_in_progress(void)
{
-#if defined(CONFIG_X86_
64) && defined(CONFIG_X86
_MCE)
+#if defined(CONFIG_X86_
NEW
_MCE)
return atomic_read(&mce_entry) > 0;
#endif
return 0;
return atomic_read(&mce_entry) > 0;
#endif
return 0;
@@
-104,7
+104,7
@@
static __init void nmi_cpu_busy(void *data)
}
#endif
}
#endif
-static void report_broken_nmi(int cpu, int *prev_nmi_count)
+static void report_broken_nmi(int cpu,
unsigned
int *prev_nmi_count)
{
printk(KERN_CONT "\n");
{
printk(KERN_CONT "\n");
@@
-138,7
+138,6
@@
int __init check_nmi_watchdog(void)
if (!prev_nmi_count)
goto error;
if (!prev_nmi_count)
goto error;
- alloc_cpumask_var(&backtrace_mask, GFP_KERNEL|__GFP_ZERO);
printk(KERN_INFO "Testing NMI watchdog ... ");
#ifdef CONFIG_SMP
printk(KERN_INFO "Testing NMI watchdog ... ");
#ifdef CONFIG_SMP
@@
-415,14
+414,17
@@
nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
}
/* We can be called before check_nmi_watchdog, hence NULL check. */
}
/* We can be called before check_nmi_watchdog, hence NULL check. */
- if (
backtrace_mask != NULL && cpumask_test_cpu(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);
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);
dump_stack();
spin_unlock(&lock);
- cpumask_clear_cpu(cpu, backtrace_mask);
+ cpumask_clear_cpu(cpu, &backtrace_mask);
+
+ rc = 1;
}
/* Could check oops_in_progress here too, but it's safer not to */
}
/* Could check oops_in_progress here too, but it's safer not to */
@@
-552,14
+554,18
@@
int do_nmi_callback(struct pt_regs *regs, int cpu)
return 0;
}
return 0;
}
-void
_
_trigger_all_cpu_backtrace(void)
+void
arch
_trigger_all_cpu_backtrace(void)
{
int i;
{
int i;
- cpumask_copy(backtrace_mask, cpu_online_mask);
+ cpumask_copy(&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++) {
/* 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(
&
backtrace_mask))
break;
mdelay(1);
}
break;
mdelay(1);
}