Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright (C) 2014 Intel Corporation
0004  *
0005  * Authors:
0006  *  Chen, Gong <gong.chen@linux.intel.com>
0007  */
0008 
0009 #include <linux/init.h>
0010 #include <linux/ras.h>
0011 #include <linux/uuid.h>
0012 
0013 #define CREATE_TRACE_POINTS
0014 #define TRACE_INCLUDE_PATH ../../include/ras
0015 #include <ras/ras_event.h>
0016 
0017 void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id,
0018                 const char *fru_text, const u8 sev, const u8 *err,
0019                 const u32 len)
0020 {
0021     trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len);
0022 }
0023 
0024 void log_arm_hw_error(struct cper_sec_proc_arm *err)
0025 {
0026     trace_arm_event(err);
0027 }
0028 
0029 static int __init ras_init(void)
0030 {
0031     int rc = 0;
0032 
0033     ras_debugfs_init();
0034     rc = ras_add_daemon_trace();
0035 
0036     return rc;
0037 }
0038 subsys_initcall(ras_init);
0039 
0040 #if defined(CONFIG_ACPI_EXTLOG) || defined(CONFIG_ACPI_EXTLOG_MODULE)
0041 EXPORT_TRACEPOINT_SYMBOL_GPL(extlog_mem_event);
0042 #endif
0043 EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event);
0044 EXPORT_TRACEPOINT_SYMBOL_GPL(non_standard_event);
0045 EXPORT_TRACEPOINT_SYMBOL_GPL(arm_event);
0046 
0047 static int __init parse_ras_param(char *str)
0048 {
0049 #ifdef CONFIG_RAS_CEC
0050     parse_cec_param(str);
0051 #endif
0052 
0053     return 1;
0054 }
0055 __setup("ras", parse_ras_param);