diff options
author | Li Zefan <lizf@cn.fujitsu.com> | 2008-02-03 02:40:30 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-02-19 10:18:29 -0500 |
commit | a062bae9c443a8c0ab17f231eb83690dfb897524 (patch) | |
tree | d7c94f3ca3733ec340ea20eb3070142ef863c62f | |
parent | 8e31c2ac1101b09ad6c6d3539b032d312cc3302b (diff) |
x86: fix compile warning building without CONFIG_SYSCTL
arch/x86/kernel/nmi_64.c:50: warning: 'unknown_nmi_panic_callback' declared 'static' but never defined
This patch also fixes nmi_32.c
Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | arch/x86/kernel/nmi_32.c | 21 | ||||
-rw-r--r-- | arch/x86/kernel/nmi_64.c | 21 |
2 files changed, 18 insertions, 24 deletions
diff --git a/arch/x86/kernel/nmi_32.c b/arch/x86/kernel/nmi_32.c index edd413650b3b..6a0aa7038685 100644 --- a/arch/x86/kernel/nmi_32.c +++ b/arch/x86/kernel/nmi_32.c | |||
@@ -46,9 +46,6 @@ static unsigned int nmi_hz = HZ; | |||
46 | 46 | ||
47 | static DEFINE_PER_CPU(short, wd_enabled); | 47 | static DEFINE_PER_CPU(short, wd_enabled); |
48 | 48 | ||
49 | /* local prototypes */ | ||
50 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu); | ||
51 | |||
52 | static int endflag __initdata = 0; | 49 | static int endflag __initdata = 0; |
53 | 50 | ||
54 | #ifdef CONFIG_SMP | 51 | #ifdef CONFIG_SMP |
@@ -391,15 +388,6 @@ __kprobes int nmi_watchdog_tick(struct pt_regs * regs, unsigned reason) | |||
391 | return rc; | 388 | return rc; |
392 | } | 389 | } |
393 | 390 | ||
394 | int do_nmi_callback(struct pt_regs * regs, int cpu) | ||
395 | { | ||
396 | #ifdef CONFIG_SYSCTL | ||
397 | if (unknown_nmi_panic) | ||
398 | return unknown_nmi_panic_callback(regs, cpu); | ||
399 | #endif | ||
400 | return 0; | ||
401 | } | ||
402 | |||
403 | #ifdef CONFIG_SYSCTL | 391 | #ifdef CONFIG_SYSCTL |
404 | 392 | ||
405 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) | 393 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu) |
@@ -453,6 +441,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | |||
453 | 441 | ||
454 | #endif | 442 | #endif |
455 | 443 | ||
444 | int do_nmi_callback(struct pt_regs *regs, int cpu) | ||
445 | { | ||
446 | #ifdef CONFIG_SYSCTL | ||
447 | if (unknown_nmi_panic) | ||
448 | return unknown_nmi_panic_callback(regs, cpu); | ||
449 | #endif | ||
450 | return 0; | ||
451 | } | ||
452 | |||
456 | void __trigger_all_cpu_backtrace(void) | 453 | void __trigger_all_cpu_backtrace(void) |
457 | { | 454 | { |
458 | int i; | 455 | int i; |
diff --git a/arch/x86/kernel/nmi_64.c b/arch/x86/kernel/nmi_64.c index fb99484d21cf..9a4fde74bee1 100644 --- a/arch/x86/kernel/nmi_64.c +++ b/arch/x86/kernel/nmi_64.c | |||
@@ -46,9 +46,6 @@ static unsigned int nmi_hz = HZ; | |||
46 | 46 | ||
47 | static DEFINE_PER_CPU(short, wd_enabled); | 47 | static DEFINE_PER_CPU(short, wd_enabled); |
48 | 48 | ||
49 | /* local prototypes */ | ||
50 | static int unknown_nmi_panic_callback(struct pt_regs *regs, int cpu); | ||
51 | |||
52 | /* Run after command line and cpu_init init, but before all other checks */ | 49 | /* Run after command line and cpu_init init, but before all other checks */ |
53 | void nmi_watchdog_default(void) | 50 | void nmi_watchdog_default(void) |
54 | { | 51 | { |
@@ -394,15 +391,6 @@ asmlinkage __kprobes void do_nmi(struct pt_regs * regs, long error_code) | |||
394 | nmi_exit(); | 391 | nmi_exit(); |
395 | } | 392 | } |
396 | 393 | ||
397 | int do_nmi_callback(struct pt_regs * regs, int cpu) | ||
398 | { | ||
399 | #ifdef CONFIG_SYSCTL | ||
400 | if (unknown_nmi_panic) | ||
401 | return unknown_nmi_panic_callback(regs, cpu); | ||
402 | #endif | ||
403 | return 0; | ||
404 | } | ||
405 | |||
406 | void stop_nmi(void) | 394 | void stop_nmi(void) |
407 | { | 395 | { |
408 | acpi_nmi_disable(); | 396 | acpi_nmi_disable(); |
@@ -464,6 +452,15 @@ int proc_nmi_enabled(struct ctl_table *table, int write, struct file *file, | |||
464 | 452 | ||
465 | #endif | 453 | #endif |
466 | 454 | ||
455 | int do_nmi_callback(struct pt_regs *regs, int cpu) | ||
456 | { | ||
457 | #ifdef CONFIG_SYSCTL | ||
458 | if (unknown_nmi_panic) | ||
459 | return unknown_nmi_panic_callback(regs, cpu); | ||
460 | #endif | ||
461 | return 0; | ||
462 | } | ||
463 | |||
467 | void __trigger_all_cpu_backtrace(void) | 464 | void __trigger_all_cpu_backtrace(void) |
468 | { | 465 | { |
469 | int i; | 466 | int i; |