[patch] 2.6.8-rc4-mm1: NMI changes don't compile with SYSCTL=n

Adrian Bunk
2004-08-11T22:14:54Z

On Tue, Aug 10, 2004 at 12:21:10AM -0700, Andrew Morton wrote:
>...
> All 529 patches:
>...
> nmi-trigger-switch-support-for-debuggingupdated.patch
> NMI trigger switch support for debugging(updated)
>...

This causes the following compile error with CONFIG_SYSCTL=n:

<-- snip -->

...
LD .tmp_vmlinux1
arch/i386/kernel/built-in.o(.text+0x185de): In function
`proc_unknown_nmi_panic':
: undefined reference to `unknown_nmi_panic'
arch/i386/kernel/built-in.o(.text+0x185ef): In function
`proc_unknown_nmi_panic':
: undefined reference to `unknown_nmi_panic'
arch/i386/kernel/built-in.o(.text+0x18615): In function
`proc_unknown_nmi_panic':
: undefined reference to `unknown_nmi_panic'
make: *** [.tmp_vmlinux1] Error 1

<-- snip -->

The following patch fixes this issue:

Signed-off-by: Adrian Bunk <bunk@fs.tum.de>

--- linux-2.6.8-rc4-mm1/arch/i386/kernel/nmi.c.old 2004-08-12 00:07:57.000000000 +0200
+++ linux-2.6.8-rc4-mm1/arch/i386/kernel/nmi.c 2004-08-12 00:09:04.000000000 +0200
@@ -534,6 +534,8 @@
}
}

+#ifdef CONFIG_SYSCTL
+
static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu)
{
unsigned char reason = get_nmi_reason();
@@ -573,6 +575,8 @@
return 0;
}

+#endif
+
EXPORT_SYMBOL(nmi_active);
EXPORT_SYMBOL(nmi_watchdog);
EXPORT_SYMBOL(reserve_lapic_nmi);