vfs: remove unused wrapper block_page_mkwrite()
[linux/fpc-iii.git] / arch / x86 / kernel / apic / hw_nmi.c
blob045e424fb3680f67405849be4aaa5355f5b4f3ff
1 /*
2 * HW NMI watchdog support
4 * started by Don Zickus, Copyright (C) 2010 Red Hat, Inc.
6 * Arch specific calls to support NMI watchdog
8 * Bits copied from original nmi.c file
11 #include <asm/apic.h>
12 #include <asm/nmi.h>
14 #include <linux/cpumask.h>
15 #include <linux/kdebug.h>
16 #include <linux/notifier.h>
17 #include <linux/kprobes.h>
18 #include <linux/nmi.h>
19 #include <linux/module.h>
20 #include <linux/delay.h>
21 #include <linux/seq_buf.h>
23 #ifdef CONFIG_HARDLOCKUP_DETECTOR
24 u64 hw_nmi_get_sample_period(int watchdog_thresh)
26 return (u64)(cpu_khz) * 1000 * watchdog_thresh;
28 #endif
30 #ifdef arch_trigger_all_cpu_backtrace
31 static void nmi_raise_cpu_backtrace(cpumask_t *mask)
33 apic->send_IPI_mask(mask, NMI_VECTOR);
36 void arch_trigger_all_cpu_backtrace(bool include_self)
38 nmi_trigger_all_cpu_backtrace(include_self, nmi_raise_cpu_backtrace);
41 static int
42 arch_trigger_all_cpu_backtrace_handler(unsigned int cmd, struct pt_regs *regs)
44 if (nmi_cpu_backtrace(regs))
45 return NMI_HANDLED;
47 return NMI_DONE;
49 NOKPROBE_SYMBOL(arch_trigger_all_cpu_backtrace_handler);
51 static int __init register_trigger_all_cpu_backtrace(void)
53 register_nmi_handler(NMI_LOCAL, arch_trigger_all_cpu_backtrace_handler,
54 0, "arch_bt");
55 return 0;
57 early_initcall(register_trigger_all_cpu_backtrace);
58 #endif