ras.c 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Copyright (C) 2014 Intel Corporation
  3. *
  4. * Authors:
  5. * Chen, Gong <gong.chen@linux.intel.com>
  6. */
  7. #include <linux/init.h>
  8. #include <linux/ras.h>
  9. #include <linux/uuid.h>
  10. #define CREATE_TRACE_POINTS
  11. #define TRACE_INCLUDE_PATH ../../include/ras
  12. #include <ras/ras_event.h>
  13. void log_non_standard_event(const uuid_le *sec_type, const uuid_le *fru_id,
  14. const char *fru_text, const u8 sev, const u8 *err,
  15. const u32 len)
  16. {
  17. trace_non_standard_event(sec_type, fru_id, fru_text, sev, err, len);
  18. }
  19. void log_arm_hw_error(struct cper_sec_proc_arm *err)
  20. {
  21. trace_arm_event(err);
  22. }
  23. static int __init ras_init(void)
  24. {
  25. int rc = 0;
  26. ras_debugfs_init();
  27. rc = ras_add_daemon_trace();
  28. return rc;
  29. }
  30. subsys_initcall(ras_init);
  31. #if defined(CONFIG_ACPI_EXTLOG) || defined(CONFIG_ACPI_EXTLOG_MODULE)
  32. EXPORT_TRACEPOINT_SYMBOL_GPL(extlog_mem_event);
  33. #endif
  34. EXPORT_TRACEPOINT_SYMBOL_GPL(mc_event);
  35. EXPORT_TRACEPOINT_SYMBOL_GPL(non_standard_event);
  36. EXPORT_TRACEPOINT_SYMBOL_GPL(arm_event);
  37. static int __init parse_ras_param(char *str)
  38. {
  39. #ifdef CONFIG_RAS_CEC
  40. parse_cec_param(str);
  41. #endif
  42. return 1;
  43. }
  44. __setup("ras", parse_ras_param);