ras.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __RAS_H__
  3. #define __RAS_H__
  4. #include <asm/errno.h>
  5. #include <linux/uuid.h>
  6. #include <linux/cper.h>
  7. #ifdef CONFIG_DEBUG_FS
  8. int ras_userspace_consumers(void);
  9. void ras_debugfs_init(void);
  10. int ras_add_daemon_trace(void);
  11. #else
  12. static inline int ras_userspace_consumers(void) { return 0; }
  13. static inline void ras_debugfs_init(void) { }
  14. static inline int ras_add_daemon_trace(void) { return 0; }
  15. #endif
  16. #ifdef CONFIG_RAS_CEC
  17. int __init parse_cec_param(char *str);
  18. #endif
  19. #ifdef CONFIG_RAS
  20. void log_non_standard_event(const guid_t *sec_type,
  21. const guid_t *fru_id, const char *fru_text,
  22. const u8 sev, const u8 *err, const u32 len);
  23. void log_arm_hw_error(struct cper_sec_proc_arm *err);
  24. #else
  25. static inline void
  26. log_non_standard_event(const guid_t *sec_type,
  27. const guid_t *fru_id, const char *fru_text,
  28. const u8 sev, const u8 *err, const u32 len)
  29. { return; }
  30. static inline void
  31. log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
  32. #endif
  33. #endif /* __RAS_H__ */