blob: 28addad0dda7afeb8a34e0f0fa510df48ab2497f [file] [log] [blame]
Paul Gortmaker0ef76532016-07-27 12:06:34 +09301#ifndef _LINUX_EXTABLE_H
2#define _LINUX_EXTABLE_H
3
Paul Gortmaker49aadcf2016-07-27 23:11:47 -04004#include <linux/stddef.h> /* for NULL */
Thomas Meyera94c33d2017-07-10 15:51:58 -07005#include <linux/types.h>
Paul Gortmaker49aadcf2016-07-27 23:11:47 -04006
Paul Gortmaker0ef76532016-07-27 12:06:34 +09307struct module;
8struct exception_table_entry;
9
10const struct exception_table_entry *
Thomas Meyera94c33d2017-07-10 15:51:58 -070011search_extable(const struct exception_table_entry *base,
12 const size_t num,
Paul Gortmaker0ef76532016-07-27 12:06:34 +093013 unsigned long value);
14void sort_extable(struct exception_table_entry *start,
15 struct exception_table_entry *finish);
16void sort_main_extable(void);
17void trim_init_extable(struct module *m);
18
19/* Given an address, look for it in the exception tables */
20const struct exception_table_entry *search_exception_tables(unsigned long add);
21
22#ifdef CONFIG_MODULES
23/* For extable.c to search modules' exception tables. */
24const struct exception_table_entry *search_module_extables(unsigned long addr);
25#else
26static inline const struct exception_table_entry *
27search_module_extables(unsigned long addr)
28{
29 return NULL;
30}
31#endif /*CONFIG_MODULES*/
32
33#endif /* _LINUX_EXTABLE_H */