You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
x86, nmi_watchdog: Remove the old nmi_watchdog
Now that we have a new nmi_watchdog that is more generic and sits on top of the perf subsystem, we really do not need the old nmi_watchdog any more. In addition, the old nmi_watchdog doesn't really work if you are using the default clocksource, hpet. The old nmi_watchdog code relied on local apic interrupts to determine if the cpu is still alive. With hpet as the clocksource, these interrupts don't increment any more and the old nmi_watchdog triggers false postives. This piece removes the old nmi_watchdog code and stubs out any variables and functions calls. The stubs are the same ones used by the new nmi_watchdog code, so it should be well tested. Signed-off-by: Don Zickus <dzickus@redhat.com> Cc: fweisbec@gmail.com Cc: gorcunov@openvz.org LKML-Reference: <1289578944-28564-2-git-send-email-dzickus@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -17,9 +17,6 @@ int do_nmi_callback(struct pt_regs *regs, int cpu);
|
||||
|
||||
extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
|
||||
extern int check_nmi_watchdog(void);
|
||||
#if !defined(CONFIG_LOCKUP_DETECTOR)
|
||||
extern int nmi_watchdog_enabled;
|
||||
#endif
|
||||
extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
|
||||
extern int reserve_perfctr_nmi(unsigned int);
|
||||
extern void release_perfctr_nmi(unsigned int);
|
||||
@@ -30,7 +27,6 @@ extern void setup_apic_nmi_watchdog(void *);
|
||||
extern void stop_apic_nmi_watchdog(void *);
|
||||
extern void disable_timer_nmi_watchdog(void);
|
||||
extern void enable_timer_nmi_watchdog(void);
|
||||
extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason);
|
||||
extern void cpu_nmi_set_wd_enabled(void);
|
||||
|
||||
extern atomic_t nmi_active;
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
#
|
||||
|
||||
obj-$(CONFIG_X86_LOCAL_APIC) += apic.o apic_noop.o probe_$(BITS).o ipi.o
|
||||
ifneq ($(CONFIG_HARDLOCKUP_DETECTOR),y)
|
||||
obj-$(CONFIG_X86_LOCAL_APIC) += nmi.o
|
||||
endif
|
||||
obj-$(CONFIG_HARDLOCKUP_DETECTOR) += hw_nmi.o
|
||||
obj-y += hw_nmi.o
|
||||
|
||||
obj-$(CONFIG_X86_IO_APIC) += io_apic.o
|
||||
obj-$(CONFIG_SMP) += ipi.o
|
||||
|
||||
@@ -20,12 +20,14 @@
|
||||
/* For reliability, we're prepared to waste bits here. */
|
||||
static DECLARE_BITMAP(backtrace_mask, NR_CPUS) __read_mostly;
|
||||
|
||||
#ifdef CONFIG_HARDLOCKUP_DETECTOR
|
||||
u64 hw_nmi_get_sample_period(void)
|
||||
{
|
||||
return (u64)(cpu_khz) * 1000 * 60;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_HAS_NMI_WATCHDOG
|
||||
#ifdef arch_trigger_all_cpu_backtrace
|
||||
void arch_trigger_all_cpu_backtrace(void)
|
||||
{
|
||||
int i;
|
||||
@@ -95,8 +97,6 @@ early_initcall(register_trigger_all_cpu_backtrace);
|
||||
#if defined(CONFIG_X86_LOCAL_APIC)
|
||||
unsigned int nmi_watchdog = NMI_NONE;
|
||||
EXPORT_SYMBOL(nmi_watchdog);
|
||||
void acpi_nmi_enable(void) { return; }
|
||||
void acpi_nmi_disable(void) { return; }
|
||||
#endif
|
||||
atomic_t nmi_active = ATOMIC_INIT(0); /* oprofile uses this */
|
||||
EXPORT_SYMBOL(nmi_active);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -398,15 +398,6 @@ static notrace __kprobes void default_do_nmi(struct pt_regs *regs)
|
||||
== NOTIFY_STOP)
|
||||
return;
|
||||
|
||||
#ifndef CONFIG_LOCKUP_DETECTOR
|
||||
/*
|
||||
* Ok, so this is none of the documented NMI sources,
|
||||
* so it must be the NMI watchdog.
|
||||
*/
|
||||
if (nmi_watchdog_tick(regs, reason))
|
||||
return;
|
||||
if (!do_nmi_callback(regs, cpu))
|
||||
#endif /* !CONFIG_LOCKUP_DETECTOR */
|
||||
unknown_nmi_error(reason, regs);
|
||||
#else
|
||||
unknown_nmi_error(reason, regs);
|
||||
|
||||
+1
-5
@@ -16,10 +16,7 @@
|
||||
*/
|
||||
#ifdef ARCH_HAS_NMI_WATCHDOG
|
||||
#include <asm/nmi.h>
|
||||
extern void touch_nmi_watchdog(void);
|
||||
extern void acpi_nmi_disable(void);
|
||||
extern void acpi_nmi_enable(void);
|
||||
#else
|
||||
#endif
|
||||
#ifndef CONFIG_HARDLOCKUP_DETECTOR
|
||||
static inline void touch_nmi_watchdog(void)
|
||||
{
|
||||
@@ -30,7 +27,6 @@ extern void touch_nmi_watchdog(void);
|
||||
#endif
|
||||
static inline void acpi_nmi_disable(void) { }
|
||||
static inline void acpi_nmi_enable(void) { }
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Create trigger_all_cpu_backtrace() out of the arch-provided
|
||||
|
||||
@@ -746,22 +746,6 @@ static struct ctl_table kern_table[] = {
|
||||
.extra2 = &one,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86) && !defined(CONFIG_LOCKUP_DETECTOR)
|
||||
{
|
||||
.procname = "unknown_nmi_panic",
|
||||
.data = &unknown_nmi_panic,
|
||||
.maxlen = sizeof (int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_dointvec,
|
||||
},
|
||||
{
|
||||
.procname = "nmi_watchdog",
|
||||
.data = &nmi_watchdog_enabled,
|
||||
.maxlen = sizeof (int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_nmi_enabled,
|
||||
},
|
||||
#endif
|
||||
#if defined(CONFIG_X86)
|
||||
{
|
||||
.procname = "panic_on_unrecovered_nmi",
|
||||
|
||||
Reference in New Issue
Block a user