1b2441318SGreg Kroah-Hartman // SPDX-License-Identifier: GPL-2.0
276ac8275SChen, Gong /*
376ac8275SChen, Gong * Copyright (C) 2014 Intel Corporation
476ac8275SChen, Gong *
576ac8275SChen, Gong * Authors:
676ac8275SChen, Gong * Chen, Gong <gong.chen@linux.intel.com>
776ac8275SChen, Gong */
876ac8275SChen, Gong
9d963cd95SChen, Gong #include <linux/init.h>
10d963cd95SChen, Gong #include <linux/ras.h>
11297b64c7STyler Baicar #include <linux/uuid.h>
12d963cd95SChen, Gong
1376ac8275SChen, Gong #define CREATE_TRACE_POINTS
1476ac8275SChen, Gong #define TRACE_INCLUDE_PATH ../../include/ras
1576ac8275SChen, Gong #include <ras/ras_event.h>
1676ac8275SChen, Gong
log_non_standard_event(const guid_t * sec_type,const guid_t * fru_id,const char * fru_text,const u8 sev,const u8 * err,const u32 len)17*9359a8cbSAndy Shevchenko void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id,
18297b64c7STyler Baicar const char *fru_text, const u8 sev, const u8 *err,
19297b64c7STyler Baicar const u32 len)
20297b64c7STyler Baicar {
21297b64c7STyler Baicar trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len);
22297b64c7STyler Baicar }
23297b64c7STyler Baicar
log_arm_hw_error(struct cper_sec_proc_arm * err)24e9279e83STyler Baicar void log_arm_hw_error(struct cper_sec_proc_arm *err)
25e9279e83STyler Baicar {
26e9279e83STyler Baicar trace_arm_event(err);
27e9279e83STyler Baicar }
28e9279e83STyler Baicar
ras_init(void)29d963cd95SChen, Gong static int __init ras_init(void)
30d963cd95SChen, Gong {
31d963cd95SChen, Gong int rc = 0;
32d963cd95SChen, Gong
33d963cd95SChen, Gong ras_debugfs_init();
34d963cd95SChen, Gong rc = ras_add_daemon_trace();
35d963cd95SChen, Gong
36d963cd95SChen, Gong return rc;
37d963cd95SChen, Gong }
38d963cd95SChen, Gong subsys_initcall(ras_init);
39d963cd95SChen, Gong
402dfb7d51SChen, Gong #if defined(CONFIG_ACPI_EXTLOG) || defined(CONFIG_ACPI_EXTLOG_MODULE)
412dfb7d51SChen, Gong EXPORT_TRACEPOINT_SYMBOL_GPL(extlog_mem_event);
422dfb7d51SChen, Gong #endif
4376ac8275SChen, Gong EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event);
44297b64c7STyler Baicar EXPORT_TRACEPOINT_SYMBOL_GPL(non_standard_event);
45e9279e83STyler Baicar EXPORT_TRACEPOINT_SYMBOL_GPL(arm_event);
46011d8261SBorislav Petkov
parse_ras_param(char * str)475f0744e5SWei Yongjun static int __init parse_ras_param(char *str)
48011d8261SBorislav Petkov {
49011d8261SBorislav Petkov #ifdef CONFIG_RAS_CEC
50011d8261SBorislav Petkov parse_cec_param(str);
51011d8261SBorislav Petkov #endif
52011d8261SBorislav Petkov
53011d8261SBorislav Petkov return 1;
54011d8261SBorislav Petkov }
55011d8261SBorislav Petkov __setup("ras", parse_ras_param);
56