Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
Chen, Gong | d963cd9 | 2014-06-11 14:02:20 -0700 | [diff] [blame] | 2 | #ifndef __RAS_H__ |
| 3 | #define __RAS_H__ |
| 4 | |
Borislav Petkov | 011d826 | 2017-03-27 11:33:02 +0200 | [diff] [blame] | 5 | #include <asm/errno.h> |
Tyler Baicar | 297b64c | 2017-06-21 12:17:12 -0600 | [diff] [blame] | 6 | #include <linux/uuid.h> |
Tyler Baicar | e9279e8 | 2017-06-21 12:17:13 -0600 | [diff] [blame] | 7 | #include <linux/cper.h> |
Borislav Petkov | 011d826 | 2017-03-27 11:33:02 +0200 | [diff] [blame] | 8 | |
Chen, Gong | d963cd9 | 2014-06-11 14:02:20 -0700 | [diff] [blame] | 9 | #ifdef CONFIG_DEBUG_FS |
| 10 | int ras_userspace_consumers(void); |
| 11 | void ras_debugfs_init(void); |
| 12 | int ras_add_daemon_trace(void); |
| 13 | #else |
| 14 | static inline int ras_userspace_consumers(void) { return 0; } |
Borislav Petkov | 011d826 | 2017-03-27 11:33:02 +0200 | [diff] [blame] | 15 | static inline void ras_debugfs_init(void) { } |
Chen, Gong | d963cd9 | 2014-06-11 14:02:20 -0700 | [diff] [blame] | 16 | static inline int ras_add_daemon_trace(void) { return 0; } |
| 17 | #endif |
| 18 | |
Borislav Petkov | 011d826 | 2017-03-27 11:33:02 +0200 | [diff] [blame] | 19 | #ifdef CONFIG_RAS_CEC |
| 20 | void __init cec_init(void); |
| 21 | int __init parse_cec_param(char *str); |
| 22 | int cec_add_elem(u64 pfn); |
| 23 | #else |
| 24 | static inline void __init cec_init(void) { } |
| 25 | static inline int cec_add_elem(u64 pfn) { return -ENODEV; } |
Chen, Gong | d963cd9 | 2014-06-11 14:02:20 -0700 | [diff] [blame] | 26 | #endif |
Borislav Petkov | 011d826 | 2017-03-27 11:33:02 +0200 | [diff] [blame] | 27 | |
Tyler Baicar | 297b64c | 2017-06-21 12:17:12 -0600 | [diff] [blame] | 28 | #ifdef CONFIG_RAS |
| 29 | void log_non_standard_event(const guid_t *sec_type, |
| 30 | const guid_t *fru_id, const char *fru_text, |
| 31 | const u8 sev, const u8 *err, const u32 len); |
Tyler Baicar | e9279e8 | 2017-06-21 12:17:13 -0600 | [diff] [blame] | 32 | void log_arm_hw_error(struct cper_sec_proc_arm *err); |
Tyler Baicar | 297b64c | 2017-06-21 12:17:12 -0600 | [diff] [blame] | 33 | #else |
Arnd Bergmann | 0607512 | 2017-06-27 17:35:41 +0200 | [diff] [blame] | 34 | static inline void |
| 35 | log_non_standard_event(const guid_t *sec_type, |
| 36 | const guid_t *fru_id, const char *fru_text, |
| 37 | const u8 sev, const u8 *err, const u32 len) |
| 38 | { return; } |
| 39 | static inline void |
| 40 | log_arm_hw_error(struct cper_sec_proc_arm *err) { return; } |
Tyler Baicar | 297b64c | 2017-06-21 12:17:12 -0600 | [diff] [blame] | 41 | #endif |
| 42 | |
Borislav Petkov | 011d826 | 2017-03-27 11:33:02 +0200 | [diff] [blame] | 43 | #endif /* __RAS_H__ */ |