Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Paul Gortmaker | 0ef7653 | 2016-07-27 12:06:34 +0930 | [diff] [blame] | 2 | #ifndef _LINUX_EXTABLE_H |
| 3 | #define _LINUX_EXTABLE_H |
| 4 | |
Paul Gortmaker | 49aadcf | 2016-07-27 23:11:47 -0400 | [diff] [blame] | 5 | #include <linux/stddef.h> /* for NULL */ |
Thomas Meyer | a94c33d | 2017-07-10 15:51:58 -0700 | [diff] [blame] | 6 | #include <linux/types.h> |
Paul Gortmaker | 49aadcf | 2016-07-27 23:11:47 -0400 | [diff] [blame] | 7 | |
Paul Gortmaker | 0ef7653 | 2016-07-27 12:06:34 +0930 | [diff] [blame] | 8 | struct module; |
| 9 | struct exception_table_entry; |
| 10 | |
| 11 | const struct exception_table_entry * |
Thomas Meyer | a94c33d | 2017-07-10 15:51:58 -0700 | [diff] [blame] | 12 | search_extable(const struct exception_table_entry *base, |
| 13 | const size_t num, |
Paul Gortmaker | 0ef7653 | 2016-07-27 12:06:34 +0930 | [diff] [blame] | 14 | unsigned long value); |
| 15 | void sort_extable(struct exception_table_entry *start, |
| 16 | struct exception_table_entry *finish); |
| 17 | void sort_main_extable(void); |
| 18 | void trim_init_extable(struct module *m); |
| 19 | |
| 20 | /* Given an address, look for it in the exception tables */ |
| 21 | const struct exception_table_entry *search_exception_tables(unsigned long add); |
| 22 | |
| 23 | #ifdef CONFIG_MODULES |
| 24 | /* For extable.c to search modules' exception tables. */ |
| 25 | const struct exception_table_entry *search_module_extables(unsigned long addr); |
| 26 | #else |
| 27 | static inline const struct exception_table_entry * |
| 28 | search_module_extables(unsigned long addr) |
| 29 | { |
| 30 | return NULL; |
| 31 | } |
| 32 | #endif /*CONFIG_MODULES*/ |
| 33 | |
| 34 | #endif /* _LINUX_EXTABLE_H */ |