Skip to content

Commit 5f2b0ba

Browse files
dzickusrhIngo Molnar
authored andcommitted
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 <[email protected]> Cc: [email protected] Cc: [email protected] LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>
1 parent a89d4bd commit 5f2b0ba

File tree

7 files changed

+5
-608
lines changed

7 files changed

+5
-608
lines changed

arch/x86/include/asm/nmi.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,6 @@ int do_nmi_callback(struct pt_regs *regs, int cpu);
1717

1818
extern void die_nmi(char *str, struct pt_regs *regs, int do_panic);
1919
extern int check_nmi_watchdog(void);
20-
#if !defined(CONFIG_LOCKUP_DETECTOR)
21-
extern int nmi_watchdog_enabled;
22-
#endif
2320
extern int avail_to_resrv_perfctr_nmi_bit(unsigned int);
2421
extern int reserve_perfctr_nmi(unsigned int);
2522
extern void release_perfctr_nmi(unsigned int);
@@ -30,7 +27,6 @@ extern void setup_apic_nmi_watchdog(void *);
3027
extern void stop_apic_nmi_watchdog(void *);
3128
extern void disable_timer_nmi_watchdog(void);
3229
extern void enable_timer_nmi_watchdog(void);
33-
extern int nmi_watchdog_tick(struct pt_regs *regs, unsigned reason);
3430
extern void cpu_nmi_set_wd_enabled(void);
3531

3632
extern atomic_t nmi_active;

arch/x86/kernel/apic/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
#
44

55
obj-$(CONFIG_X86_LOCAL_APIC) += apic.o apic_noop.o probe_$(BITS).o ipi.o
6-
ifneq ($(CONFIG_HARDLOCKUP_DETECTOR),y)
7-
obj-$(CONFIG_X86_LOCAL_APIC) += nmi.o
8-
endif
9-
obj-$(CONFIG_HARDLOCKUP_DETECTOR) += hw_nmi.o
6+
obj-y += hw_nmi.o
107

118
obj-$(CONFIG_X86_IO_APIC) += io_apic.o
129
obj-$(CONFIG_SMP) += ipi.o

arch/x86/kernel/apic/hw_nmi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@
2020
/* For reliability, we're prepared to waste bits here. */
2121
static DECLARE_BITMAP(backtrace_mask, NR_CPUS) __read_mostly;
2222

23+
#ifdef CONFIG_HARDLOCKUP_DETECTOR
2324
u64 hw_nmi_get_sample_period(void)
2425
{
2526
return (u64)(cpu_khz) * 1000 * 60;
2627
}
28+
#endif
2729

28-
#ifdef ARCH_HAS_NMI_WATCHDOG
30+
#ifdef arch_trigger_all_cpu_backtrace
2931
void arch_trigger_all_cpu_backtrace(void)
3032
{
3133
int i;
@@ -95,8 +97,6 @@ early_initcall(register_trigger_all_cpu_backtrace);
9597
#if defined(CONFIG_X86_LOCAL_APIC)
9698
unsigned int nmi_watchdog = NMI_NONE;
9799
EXPORT_SYMBOL(nmi_watchdog);
98-
void acpi_nmi_enable(void) { return; }
99-
void acpi_nmi_disable(void) { return; }
100100
#endif
101101
atomic_t nmi_active = ATOMIC_INIT(0); /* oprofile uses this */
102102
EXPORT_SYMBOL(nmi_active);

0 commit comments

Comments
 (0)