Merge tag 'perf-tools-fixes-for-v6.9-2024-04-19' of git://git.kernel.org/pub/scm...
[linux-2.6-block.git] / include / linux / extable.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
0ef76537
PG
2#ifndef _LINUX_EXTABLE_H
3#define _LINUX_EXTABLE_H
4
49aadcf1 5#include <linux/stddef.h> /* for NULL */
a94c33dd 6#include <linux/types.h>
49aadcf1 7
0ef76537
PG
8struct module;
9struct exception_table_entry;
10
11const struct exception_table_entry *
a94c33dd
TM
12search_extable(const struct exception_table_entry *base,
13 const size_t num,
0ef76537
PG
14 unsigned long value);
15void sort_extable(struct exception_table_entry *start,
16 struct exception_table_entry *finish);
17void sort_main_extable(void);
18void trim_init_extable(struct module *m);
19
20/* Given an address, look for it in the exception tables */
21const struct exception_table_entry *search_exception_tables(unsigned long add);
49ec9177
SS
22const struct exception_table_entry *
23search_kernel_exception_table(unsigned long addr);
0ef76537
PG
24
25#ifdef CONFIG_MODULES
26/* For extable.c to search modules' exception tables. */
27const struct exception_table_entry *search_module_extables(unsigned long addr);
28#else
29static inline const struct exception_table_entry *
30search_module_extables(unsigned long addr)
31{
32 return NULL;
33}
34#endif /*CONFIG_MODULES*/
35
3dec541b
AS
36#ifdef CONFIG_BPF_JIT
37const struct exception_table_entry *search_bpf_extables(unsigned long addr);
38#else
39static inline const struct exception_table_entry *
40search_bpf_extables(unsigned long addr)
41{
42 return NULL;
43}
44#endif
45
0ef76537 46#endif /* _LINUX_EXTABLE_H */