Skip to content

Commit

Permalink
[PATCH] x86_64: CONFIG_BUG=n fixes
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alexander Nyberg authored and Linus Torvalds committed May 25, 2005
1 parent dca79a0 commit 4f60fdf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions arch/x86_64/kernel/traps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion arch/x86_64/kernel/x8664_ksyms.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 2 additions & 0 deletions include/asm-x86_64/bug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 4f60fdf

Please sign in to comment.