Index: arch/v850/kernel/bug.c =================================================================== RCS file: /var/cvs/uClinux-2.4.x/arch/v850/kernel/bug.c,v retrieving revision 1.2 diff -u -r1.2 bug.c --- arch/v850/kernel/bug.c 2002/01/10 12:36:30 1.2 +++ arch/v850/kernel/bug.c 2002/03/28 07:53:59 @@ -1,8 +1,8 @@ /* * arch/v850/kernel/bug.c -- Bug reporting functions * - * Copyright (C) 2001 NEC Corporation - * Copyright (C) 2001 Miles Bader + * Copyright (C) 2001, 2002 NEC Corporation + * Copyright (C) 2001, 2002 Miles Bader * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this @@ -29,6 +29,17 @@ machine_halt (); } + + +/* We define `out_of_line_bug' for inline functions in header files to use. + There might be an arch-independent version of `out_of_line_bug', so + avoid interfering with it, if it exists. */ +void out_of_line_bug (void) __attribute__ ((weak, noreturn)); +void out_of_line_bug (void) +{ + BUG(); +} + int bad_trap (int trap_num, struct pt_regs *regs) { Index: include/asm-v850/page.h =================================================================== RCS file: /var/cvs/uClinux-2.4.x/include/asm-v850/page.h,v retrieving revision 1.1 diff -u -r1.1 page.h --- include/asm-v850/page.h 2001/10/22 13:39:02 1.1 +++ include/asm-v850/page.h 2002/03/28 07:54:07 @@ -1,8 +1,8 @@ /* * include/asm-v850/page.h -- VM ops * - * Copyright (C) 2001 NEC Corporation - * Copyright (C) 2001 Miles Bader + * Copyright (C) 2001, 2002 NEC Corporation + * Copyright (C) 2001, 2002 Miles Bader * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this @@ -92,6 +92,7 @@ #ifndef __ASSEMBLY__ extern void __bug(const char *file, int line, void *data); +extern void out_of_line_bug(void) __attribute ((noreturn)); #define BUG() __bug(__FILE__, __LINE__, NULL) #define PAGE_BUG(page) __bug(__FILE__, __LINE__, page) Index: include/asm-v850/pgalloc.h =================================================================== RCS file: /var/cvs/uClinux-2.4.x/include/asm-v850/pgalloc.h,v retrieving revision 1.1 diff -u -r1.1 pgalloc.h --- include/asm-v850/pgalloc.h 2001/10/22 13:39:02 1.1 +++ include/asm-v850/pgalloc.h 2002/03/28 07:54:07 @@ -1,8 +1,8 @@ /* * include/asm-v850/pgalloc.h * - * Copyright (C) 2001 NEC Corporation - * Copyright (C) 2001 Miles Bader + * Copyright (C) 2001, 2002 NEC Corporation + * Copyright (C) 2001, 2002 Miles Bader * * This file is subject to the terms and conditions of the GNU General * Public License. See the file COPYING in the main directory of this @@ -44,12 +44,12 @@ */ static inline void __flush_tlb(void) { - BUG(); + out_of_line_bug (); } static inline void __flush_tlb_one(unsigned long addr) { - BUG(); + out_of_line_bug (); } #define flush_tlb() __flush_tlb() @@ -59,34 +59,34 @@ */ static inline void flush_tlb_all(void) { - BUG(); + out_of_line_bug (); } static inline void flush_tlb_mm(struct mm_struct *mm) { - BUG(); + out_of_line_bug (); } static inline void flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) { - BUG(); + out_of_line_bug (); } static inline void flush_tlb_range(struct mm_struct *mm, unsigned long start, unsigned long end) { - BUG(); + out_of_line_bug (); } extern inline void flush_tlb_kernel_page(unsigned long addr) { - BUG(); + out_of_line_bug (); } extern inline void flush_tlb_pgtables(struct mm_struct *mm, unsigned long start, unsigned long end) { - BUG(); + out_of_line_bug (); } #endif /* _V850_PGALLOC_H */ Index: include/asm-v850/pgtable.h =================================================================== RCS file: /var/cvs/uClinux-2.4.x/include/asm-v850/pgtable.h,v retrieving revision 1.2 diff -u -r1.2 pgtable.h --- include/asm-v850/pgtable.h 2002/01/10 12:36:32 1.2 +++ include/asm-v850/pgtable.h 2002/03/28 07:54:07 @@ -4,7 +4,7 @@ #include #include -#define page_address(page) ({ if (!(page)->virtual) BUG(); (page)->virtual;}) +#define page_address(page) ({ if (!(page)->virtual) out_of_line_bug(); (page)->virtual;}) #define __page_address(page) (PAGE_OFFSET + (((page) - mem_map) << PAGE_SHIFT)) #define pgd_present(pgd) (1) /* pages are always present on NO_MM */ #define kern_addr_valid(addr) (1)