1b2441318SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0 */
2d963cd95SChen, Gong #ifndef __RAS_H__
3d963cd95SChen, Gong #define __RAS_H__
4d963cd95SChen, Gong
5011d8261SBorislav Petkov #include <asm/errno.h>
6297b64c7STyler Baicar #include <linux/uuid.h>
7e9279e83STyler Baicar #include <linux/cper.h>
8011d8261SBorislav Petkov
9d963cd95SChen, Gong #ifdef CONFIG_DEBUG_FS
10d963cd95SChen, Gong int ras_userspace_consumers(void);
11d963cd95SChen, Gong void ras_debugfs_init(void);
12d963cd95SChen, Gong int ras_add_daemon_trace(void);
13d963cd95SChen, Gong #else
ras_userspace_consumers(void)14d963cd95SChen, Gong static inline int ras_userspace_consumers(void) { return 0; }
ras_debugfs_init(void)15011d8261SBorislav Petkov static inline void ras_debugfs_init(void) { }
ras_add_daemon_trace(void)16d963cd95SChen, Gong static inline int ras_add_daemon_trace(void) { return 0; }
17d963cd95SChen, Gong #endif
18d963cd95SChen, Gong
19011d8261SBorislav Petkov #ifdef CONFIG_RAS_CEC
20011d8261SBorislav Petkov int __init parse_cec_param(char *str);
21d963cd95SChen, Gong #endif
22011d8261SBorislav Petkov
23297b64c7STyler Baicar #ifdef CONFIG_RAS
24297b64c7STyler Baicar void log_non_standard_event(const guid_t *sec_type,
25297b64c7STyler Baicar const guid_t *fru_id, const char *fru_text,
26297b64c7STyler Baicar const u8 sev, const u8 *err, const u32 len);
27e9279e83STyler Baicar void log_arm_hw_error(struct cper_sec_proc_arm *err);
28297b64c7STyler Baicar #else
290607512dSArnd Bergmann 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)300607512dSArnd Bergmann log_non_standard_event(const guid_t *sec_type,
31297b64c7STyler Baicar const guid_t *fru_id, const char *fru_text,
320607512dSArnd Bergmann const u8 sev, const u8 *err, const u32 len)
330607512dSArnd Bergmann { return; }
340607512dSArnd Bergmann static inline void
log_arm_hw_error(struct cper_sec_proc_arm * err)350607512dSArnd Bergmann log_arm_hw_error(struct cper_sec_proc_arm *err) { return; }
36297b64c7STyler Baicar #endif
37297b64c7STyler Baicar
38011d8261SBorislav Petkov #endif /* __RAS_H__ */
39