2018-01-12 20:55:03 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
|
|
|
#ifndef _LINUX_ERROR_INJECTION_H
|
|
|
|
#define _LINUX_ERROR_INJECTION_H
|
|
|
|
|
2019-08-06 13:00:13 +03:00
|
|
|
#include <linux/compiler.h>
|
|
|
|
#include <asm-generic/error-injection.h>
|
2018-01-12 20:55:03 +03:00
|
|
|
|
2019-08-06 13:00:13 +03:00
|
|
|
#ifdef CONFIG_FUNCTION_ERROR_INJECTION
|
2018-01-12 20:55:03 +03:00
|
|
|
|
|
|
|
extern bool within_error_injection_list(unsigned long addr);
|
2018-01-12 20:55:33 +03:00
|
|
|
extern int get_injectable_error_type(unsigned long addr);
|
2018-01-12 20:55:03 +03:00
|
|
|
|
|
|
|
#else /* !CONFIG_FUNCTION_ERROR_INJECTION */
|
|
|
|
|
|
|
|
static inline bool within_error_injection_list(unsigned long addr)
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
2018-01-12 20:55:33 +03:00
|
|
|
static inline int get_injectable_error_type(unsigned long addr)
|
|
|
|
{
|
|
|
|
return EI_ETYPE_NONE;
|
|
|
|
}
|
|
|
|
|
2018-01-12 20:55:03 +03:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _LINUX_ERROR_INJECTION_H */
|