Chen, Gong | 76ac827 | 2014-06-11 13:54:04 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2014 Intel Corporation |
| 3 | * |
| 4 | * Authors: |
| 5 | * Chen, Gong <gong.chen@linux.intel.com> |
| 6 | */ |
| 7 | |
Chen, Gong | d963cd9 | 2014-06-11 14:02:20 -0700 | [diff] [blame] | 8 | #include <linux/init.h> |
| 9 | #include <linux/ras.h> |
Tyler Baicar | 297b64c | 2017-06-21 12:17:12 -0600 | [diff] [blame^] | 10 | #include <linux/uuid.h> |
Chen, Gong | d963cd9 | 2014-06-11 14:02:20 -0700 | [diff] [blame] | 11 | |
Chen, Gong | 76ac827 | 2014-06-11 13:54:04 -0700 | [diff] [blame] | 12 | #define CREATE_TRACE_POINTS |
| 13 | #define TRACE_INCLUDE_PATH ../../include/ras |
| 14 | #include <ras/ras_event.h> |
| 15 | |
Tyler Baicar | 297b64c | 2017-06-21 12:17:12 -0600 | [diff] [blame^] | 16 | void log_non_standard_event(const uuid_le *sec_type, const uuid_le *fru_id, |
| 17 | const char *fru_text, const u8 sev, const u8 *err, |
| 18 | const u32 len) |
| 19 | { |
| 20 | trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len); |
| 21 | } |
| 22 | |
Chen, Gong | d963cd9 | 2014-06-11 14:02:20 -0700 | [diff] [blame] | 23 | static int __init ras_init(void) |
| 24 | { |
| 25 | int rc = 0; |
| 26 | |
| 27 | ras_debugfs_init(); |
| 28 | rc = ras_add_daemon_trace(); |
| 29 | |
| 30 | return rc; |
| 31 | } |
| 32 | subsys_initcall(ras_init); |
| 33 | |
Chen, Gong | 2dfb7d5 | 2014-06-17 22:33:07 -0400 | [diff] [blame] | 34 | #if defined(CONFIG_ACPI_EXTLOG) || defined(CONFIG_ACPI_EXTLOG_MODULE) |
| 35 | EXPORT_TRACEPOINT_SYMBOL_GPL(extlog_mem_event); |
| 36 | #endif |
Chen, Gong | 76ac827 | 2014-06-11 13:54:04 -0700 | [diff] [blame] | 37 | EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event); |
Tyler Baicar | 297b64c | 2017-06-21 12:17:12 -0600 | [diff] [blame^] | 38 | EXPORT_TRACEPOINT_SYMBOL_GPL(non_standard_event); |
Borislav Petkov | 011d826 | 2017-03-27 11:33:02 +0200 | [diff] [blame] | 39 | |
| 40 | int __init parse_ras_param(char *str) |
| 41 | { |
| 42 | #ifdef CONFIG_RAS_CEC |
| 43 | parse_cec_param(str); |
| 44 | #endif |
| 45 | |
| 46 | return 1; |
| 47 | } |
| 48 | __setup("ras", parse_ras_param); |