4 #include <linux/module.h>
8 BUG_TRAP_TYPE_NONE
= 0,
9 BUG_TRAP_TYPE_WARN
= 1,
10 BUG_TRAP_TYPE_BUG
= 2,
15 #ifdef CONFIG_GENERIC_BUG
16 #include <asm-generic/bug.h>
18 static inline int is_warning_bug(const struct bug_entry
*bug
)
20 return bug
->flags
& BUGFLAG_WARNING
;
23 const struct bug_entry
*find_bug(unsigned long bugaddr
);
25 enum bug_trap_type
report_bug(unsigned long bug_addr
, struct pt_regs
*regs
);
27 int module_bug_finalize(const Elf_Ehdr
*, const Elf_Shdr
*,
29 void module_bug_cleanup(struct module
*);
31 /* These are defined by the architecture */
32 int is_valid_bugaddr(unsigned long addr
);
34 #else /* !CONFIG_GENERIC_BUG */
36 static inline enum bug_trap_type
report_bug(unsigned long bug_addr
,
39 return BUG_TRAP_TYPE_BUG
;
41 static inline int module_bug_finalize(const Elf_Ehdr
*hdr
,
42 const Elf_Shdr
*sechdrs
,
47 static inline void module_bug_cleanup(struct module
*mod
) {}
49 #endif /* CONFIG_GENERIC_BUG */
50 #endif /* _LINUX_BUG_H */