2014-06-12 04:02:20 +07:00
|
|
|
#ifndef __RAS_H__
|
|
|
|
#define __RAS_H__
|
|
|
|
|
2017-03-27 16:33:02 +07:00
|
|
|
#include <asm/errno.h>
|
2017-06-22 01:17:12 +07:00
|
|
|
#include <linux/uuid.h>
|
2017-06-22 01:17:13 +07:00
|
|
|
#include <linux/cper.h>
|
2017-03-27 16:33:02 +07:00
|
|
|
|
2014-06-12 04:02:20 +07:00
|
|
|
#ifdef CONFIG_DEBUG_FS
|
|
|
|
int ras_userspace_consumers(void);
|
|
|
|
void ras_debugfs_init(void);
|
|
|
|
int ras_add_daemon_trace(void);
|
|
|
|
#else
|
|
|
|
static inline int ras_userspace_consumers(void) { return 0; }
|
2017-03-27 16:33:02 +07:00
|
|
|
static inline void ras_debugfs_init(void) { }
|
2014-06-12 04:02:20 +07:00
|
|
|
static inline int ras_add_daemon_trace(void) { return 0; }
|
|
|
|
#endif
|
|
|
|
|
2017-03-27 16:33:02 +07:00
|
|
|
#ifdef CONFIG_RAS_CEC
|
|
|
|
void __init cec_init(void);
|
|
|
|
int __init parse_cec_param(char *str);
|
|
|
|
int cec_add_elem(u64 pfn);
|
|
|
|
#else
|
|
|
|
static inline void __init cec_init(void) { }
|
|
|
|
static inline int cec_add_elem(u64 pfn) { return -ENODEV; }
|
2014-06-12 04:02:20 +07:00
|
|
|
#endif
|
2017-03-27 16:33:02 +07:00
|
|
|
|
2017-06-22 01:17:12 +07:00
|
|
|
#ifdef CONFIG_RAS
|
|
|
|
void log_non_standard_event(const guid_t *sec_type,
|
|
|
|
const guid_t *fru_id, const char *fru_text,
|
|
|
|
const u8 sev, const u8 *err, const u32 len);
|
2017-06-22 01:17:13 +07:00
|
|
|
void log_arm_hw_error(struct cper_sec_proc_arm *err);
|
2017-06-22 01:17:12 +07:00
|
|
|
#else
|
2017-06-27 22:35:41 +07:00
|
|
|
static inline void
|
|
|
|
log_non_standard_event(const guid_t *sec_type,
|
|
|
|
const guid_t *fru_id, const char *fru_text,
|
|
|
|
const u8 sev, const u8 *err, const u32 len)
|
|
|
|
{ return; }
|
|
|
|
static inline void
|
|
|
|
log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
|
2017-06-22 01:17:12 +07:00
|
|
|
#endif
|
|
|
|
|
2017-03-27 16:33:02 +07:00
|
|
|
#endif /* __RAS_H__ */
|