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