blob: 5429d37957329f83387a2da6bc687162024de1b0 [file] [log] [blame]
Chen, Gong76ac8272014-06-11 13:54:04 -07001/*
2 * Copyright (C) 2014 Intel Corporation
3 *
4 * Authors:
5 * Chen, Gong <gong.chen@linux.intel.com>
6 */
7
Chen, Gongd963cd92014-06-11 14:02:20 -07008#include <linux/init.h>
9#include <linux/ras.h>
Tyler Baicar297b64c2017-06-21 12:17:12 -060010#include <linux/uuid.h>
Chen, Gongd963cd92014-06-11 14:02:20 -070011
Chen, Gong76ac8272014-06-11 13:54:04 -070012#define CREATE_TRACE_POINTS
13#define TRACE_INCLUDE_PATH ../../include/ras
14#include <ras/ras_event.h>
15
Tyler Baicar297b64c2017-06-21 12:17:12 -060016void 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
Tyler Baicare9279e82017-06-21 12:17:13 -060023void log_arm_hw_error(struct cper_sec_proc_arm *err)
24{
25 trace_arm_event(err);
26}
27
Chen, Gongd963cd92014-06-11 14:02:20 -070028static int __init ras_init(void)
29{
30 int rc = 0;
31
32 ras_debugfs_init();
33 rc = ras_add_daemon_trace();
34
35 return rc;
36}
37subsys_initcall(ras_init);
38
Chen, Gong2dfb7d52014-06-17 22:33:07 -040039#if defined(CONFIG_ACPI_EXTLOG) || defined(CONFIG_ACPI_EXTLOG_MODULE)
40EXPORT_TRACEPOINT_SYMBOL_GPL(extlog_mem_event);
41#endif
Chen, Gong76ac8272014-06-11 13:54:04 -070042EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event);
Tyler Baicar297b64c2017-06-21 12:17:12 -060043EXPORT_TRACEPOINT_SYMBOL_GPL(non_standard_event);
Tyler Baicare9279e82017-06-21 12:17:13 -060044EXPORT_TRACEPOINT_SYMBOL_GPL(arm_event);
Borislav Petkov011d8262017-03-27 11:33:02 +020045
Wei Yongjun5f0744e2017-05-19 11:39:12 +020046static int __init parse_ras_param(char *str)
Borislav Petkov011d8262017-03-27 11:33:02 +020047{
48#ifdef CONFIG_RAS_CEC
49 parse_cec_param(str);
50#endif
51
52 return 1;
53}
54__setup("ras", parse_ras_param);