From: Alexander Nyberg <[email-masked]>

Fixes some !CONFIG_BUG warnings:
include/asm/mmu_context.h: I funktion `switch_mm':
include/asm/mmu_context.h:57: varning: implicit declaration of function `out_of_line_bug'

Signed-off-by: Alexander Nyberg <[email-masked]>
Cc: Andi Kleen <[email-masked]>
Signed-off-by: Andrew Morton <[email-masked]>
---

 arch/x86_64/kernel/traps.c       |    2 ++
 arch/x86_64/kernel/x8664_ksyms.c |    3 ++-
 include/asm-x86_64/bug.h         |    2 ++
 3 files changed, 6 insertions(+), 1 deletion(-)

diff -puN arch/x86_64/kernel/traps.c~x86_64-config_bug=n-fixes arch/x86_64/kernel/traps.c
--- 25/arch/x86_64/kernel/traps.c~x86_64-config_bug=n-fixes	2005-05-25 12:30:23.000000000 -0700
+++ 25-akpm/arch/x86_64/kernel/traps.c	2005-05-25 12:30:23.000000000 -0700
@@ -332,10 +332,12 @@ void handle_BUG(struct pt_regs *regs)
 	printk(KERN_ALERT "Kernel BUG at %.50s:%d\n", f.filename, f.line);
 } 
 
+#ifdef CONFIG_BUG
 void out_of_line_bug(void)
 { 
 	BUG(); 
 } 
+#endif
 
 static DEFINE_SPINLOCK(die_lock);
 static int die_owner = -1;
diff -puN arch/x86_64/kernel/x8664_ksyms.c~x86_64-config_bug=n-fixes arch/x86_64/kernel/x8664_ksyms.c
--- 25/arch/x86_64/kernel/x8664_ksyms.c~x86_64-config_bug=n-fixes	2005-05-25 12:30:23.000000000 -0700
+++ 25-akpm/arch/x86_64/kernel/x8664_ksyms.c	2005-05-25 12:30:23.000000000 -0700
@@ -193,8 +193,9 @@ EXPORT_SYMBOL(smp_num_siblings);
 extern void do_softirq_thunk(void);
 EXPORT_SYMBOL(do_softirq_thunk);
 
-void out_of_line_bug(void);
+#ifdef CONFIG_BUG
 EXPORT_SYMBOL(out_of_line_bug);
+#endif
 
 EXPORT_SYMBOL(init_level4_pgt);
 
diff -puN include/asm-x86_64/bug.h~x86_64-config_bug=n-fixes include/asm-x86_64/bug.h
--- 25/include/asm-x86_64/bug.h~x86_64-config_bug=n-fixes	2005-05-25 12:30:23.000000000 -0700
+++ 25-akpm/include/asm-x86_64/bug.h	2005-05-25 12:30:23.000000000 -0700
@@ -21,6 +21,8 @@ struct bug_frame {
 	asm volatile("ud2 ; .quad %c1 ; .short %c0" :: \
 		     "i"(__LINE__), "i" (__stringify(__FILE__)))
 void out_of_line_bug(void);
+#else
+static inline void out_of_line_bug(void) { }
 #endif
 
 #include <asm-generic/bug.h>
_