diff options
Diffstat (limited to 'include/linux/error-injection.h')
-rw-r--r-- | include/linux/error-injection.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/error-injection.h b/include/linux/error-injection.h new file mode 100644 index 000000000000..280c61ecbf20 --- /dev/null +++ b/include/linux/error-injection.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* SPDX-License-Identifier: GPL-2.0 */ | ||
2 | #ifndef _LINUX_ERROR_INJECTION_H | ||
3 | #define _LINUX_ERROR_INJECTION_H | ||
4 | |||
5 | #ifdef CONFIG_FUNCTION_ERROR_INJECTION | ||
6 | |||
7 | #include <asm/error-injection.h> | ||
8 | |||
9 | extern bool within_error_injection_list(unsigned long addr); | ||
10 | extern int get_injectable_error_type(unsigned long addr); | ||
11 | |||
12 | #else /* !CONFIG_FUNCTION_ERROR_INJECTION */ | ||
13 | |||
14 | #include <asm-generic/error-injection.h> | ||
15 | static inline bool within_error_injection_list(unsigned long addr) | ||
16 | { | ||
17 | return false; | ||
18 | } | ||
19 | |||
20 | static inline int get_injectable_error_type(unsigned long addr) | ||
21 | { | ||
22 | return EI_ETYPE_NONE; | ||
23 | } | ||
24 | |||
25 | #endif | ||
26 | |||
27 | #endif /* _LINUX_ERROR_INJECTION_H */ | ||