blob: 95540ea8dd9db905fa76019e9a0ce618c053a84c [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001// SPDX-License-Identifier: GPL-2.0
Chen, Gong76ac8272014-06-11 13:54:04 -07002/*
3 * Copyright (C) 2014 Intel Corporation
4 *
5 * Authors:
6 * Chen, Gong <gong.chen@linux.intel.com>
7 */
8
Chen, Gongd963cd92014-06-11 14:02:20 -07009#include <linux/init.h>
10#include <linux/ras.h>
Tyler Baicar297b64c2017-06-21 12:17:12 -060011#include <linux/uuid.h>
Chen, Gongd963cd92014-06-11 14:02:20 -070012
Chen, Gong76ac8272014-06-11 13:54:04 -070013#define CREATE_TRACE_POINTS
14#define TRACE_INCLUDE_PATH ../../include/ras
15#include <ras/ras_event.h>
16
Andy Shevchenko9359a8c2019-01-25 16:30:35 +020017void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id,
Tyler Baicar297b64c2017-06-21 12:17:12 -060018 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 Baicare9279e82017-06-21 12:17:13 -060024void log_arm_hw_error(struct cper_sec_proc_arm *err)
25{
26 trace_arm_event(err);
27}
28
Chen, Gongd963cd92014-06-11 14:02:20 -070029static 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}
38subsys_initcall(ras_init);
39
Chen, Gong2dfb7d52014-06-17 22:33:07 -040040#if defined(CONFIG_ACPI_EXTLOG) || defined(CONFIG_ACPI_EXTLOG_MODULE)
41EXPORT_TRACEPOINT_SYMBOL_GPL(extlog_mem_event);
42#endif
Chen, Gong76ac8272014-06-11 13:54:04 -070043EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event);
Tyler Baicar297b64c2017-06-21 12:17:12 -060044EXPORT_TRACEPOINT_SYMBOL_GPL(non_standard_event);
Tyler Baicare9279e82017-06-21 12:17:13 -060045EXPORT_TRACEPOINT_SYMBOL_GPL(arm_event);
Borislav Petkov011d8262017-03-27 11:33:02 +020046
Wei Yongjun5f0744e2017-05-19 11:39:12 +020047static int __init parse_ras_param(char *str)
Borislav Petkov011d8262017-03-27 11:33:02 +020048{
49#ifdef CONFIG_RAS_CEC
50 parse_cec_param(str);
51#endif
52
53 return 1;
54}
55__setup("ras", parse_ras_param);