Blame view

drivers/ras/ras.c 1.14 KB
b24413180   Greg Kroah-Hartman   License cleanup: ...
1
  // SPDX-License-Identifier: GPL-2.0
76ac8275f   Chen, Gong   trace, RAS: Add b...
2
3
4
5
6
7
  /*
   * Copyright (C) 2014 Intel Corporation
   *
   * Authors:
   *	Chen, Gong <gong.chen@linux.intel.com>
   */
d963cd95b   Chen, Gong   RAS, debugfs: Add...
8
9
  #include <linux/init.h>
  #include <linux/ras.h>
297b64c74   Tyler Baicar   ras: acpi / apei:...
10
  #include <linux/uuid.h>
d963cd95b   Chen, Gong   RAS, debugfs: Add...
11

76ac8275f   Chen, Gong   trace, RAS: Add b...
12
13
14
  #define CREATE_TRACE_POINTS
  #define TRACE_INCLUDE_PATH ../../include/ras
  #include <ras/ras_event.h>
9359a8cbc   Andy Shevchenko   RAS: Use consiste...
15
  void log_non_standard_event(const guid_t *sec_type, const guid_t *fru_id,
297b64c74   Tyler Baicar   ras: acpi / apei:...
16
17
18
19
20
  			    const char *fru_text, const u8 sev, const u8 *err,
  			    const u32 len)
  {
  	trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len);
  }
e9279e83a   Tyler Baicar   trace, ras: add A...
21
22
23
24
  void log_arm_hw_error(struct cper_sec_proc_arm *err)
  {
  	trace_arm_event(err);
  }
d963cd95b   Chen, Gong   RAS, debugfs: Add...
25
26
27
28
29
30
31
32
33
34
  static int __init ras_init(void)
  {
  	int rc = 0;
  
  	ras_debugfs_init();
  	rc = ras_add_daemon_trace();
  
  	return rc;
  }
  subsys_initcall(ras_init);
2dfb7d51a   Chen, Gong   trace, RAS: Add e...
35
36
37
  #if defined(CONFIG_ACPI_EXTLOG) || defined(CONFIG_ACPI_EXTLOG_MODULE)
  EXPORT_TRACEPOINT_SYMBOL_GPL(extlog_mem_event);
  #endif
76ac8275f   Chen, Gong   trace, RAS: Add b...
38
  EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event);
297b64c74   Tyler Baicar   ras: acpi / apei:...
39
  EXPORT_TRACEPOINT_SYMBOL_GPL(non_standard_event);
e9279e83a   Tyler Baicar   trace, ras: add A...
40
  EXPORT_TRACEPOINT_SYMBOL_GPL(arm_event);
011d82611   Borislav Petkov   RAS: Add a Correc...
41

5f0744e50   Wei Yongjun   RAS: Make local f...
42
  static int __init parse_ras_param(char *str)
011d82611   Borislav Petkov   RAS: Add a Correc...
43
44
45
46
47
48
49
50
  {
  #ifdef CONFIG_RAS_CEC
  	parse_cec_param(str);
  #endif
  
  	return 1;
  }
  __setup("ras", parse_ras_param);