error-injection.h 612 B

12345678910111213141516171819202122232425262728
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _LINUX_ERROR_INJECTION_H
  3. #define _LINUX_ERROR_INJECTION_H
  4. #ifdef CONFIG_FUNCTION_ERROR_INJECTION
  5. #include <asm/error-injection.h>
  6. extern bool within_error_injection_list(unsigned long addr);
  7. extern int get_injectable_error_type(unsigned long addr);
  8. #else /* !CONFIG_FUNCTION_ERROR_INJECTION */
  9. #include <asm-generic/error-injection.h>
  10. static inline bool within_error_injection_list(unsigned long addr)
  11. {
  12. return false;
  13. }
  14. static inline int get_injectable_error_type(unsigned long addr)
  15. {
  16. return EI_ETYPE_NONE;
  17. }
  18. #endif
  19. #endif /* _LINUX_ERROR_INJECTION_H */