[PATCH] x86_64: CONFIG_BUG=n fixes
authorAlexander Nyberg <alexn@telia.com>
Wed, 25 May 2005 19:31:28 +0000 (12:31 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Wed, 25 May 2005 22:31:28 +0000 (15:31 -0700)
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 <alexn@telia.com>
Cc: Andi Kleen <ak@muc.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/x86_64/kernel/traps.c
arch/x86_64/kernel/x8664_ksyms.c
include/asm-x86_64/bug.h

index 65a37f52c56ef2c0760f2e3db9dfec9312a74d88..3dfec8fdabcdd35799cf014d08fc89d6bf1a7701 100644 (file)
@@ -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;
index a43dedb58fa2a7415bd281be832186ff3a34f900..68ec03070e5adbe82925dba26772a688cecd1b9b 100644 (file)
@@ -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);
 
index bdbf66eab6eebb310193f7368361460ee731552b..3d2a666a5dd536f95239f2637c1ee87c4bb48376 100644 (file)
@@ -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>