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