aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-02-19 19:26:22 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-21 12:16:27 -0500
commit8dd93d450bff251575c56b8f058393124e1f00fb (patch)
treebee1cae0a29936d2897a5d84afdc20e524b1022b
parente7e248304c8ccf02b89e04c3b3b66006b993b5a7 (diff)
edac: add support for error type "Info"
The CPER spec defines a forth type of error: informational logs. Add support for it at the edac API and at the trace event interface. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--include/linux/edac.h16
-rw-r--r--include/ras/ras_event.h4
2 files changed, 17 insertions, 3 deletions
diff --git a/include/linux/edac.h b/include/linux/edac.h
index 096b7fcdf484..4fd4999ccb5b 100644
--- a/include/linux/edac.h
+++ b/include/linux/edac.h
@@ -109,8 +109,24 @@ enum hw_event_mc_err_type {
109 HW_EVENT_ERR_CORRECTED, 109 HW_EVENT_ERR_CORRECTED,
110 HW_EVENT_ERR_UNCORRECTED, 110 HW_EVENT_ERR_UNCORRECTED,
111 HW_EVENT_ERR_FATAL, 111 HW_EVENT_ERR_FATAL,
112 HW_EVENT_ERR_INFO,
112}; 113};
113 114
115static inline char *mc_event_error_type(const unsigned int err_type)
116{
117 switch (err_type) {
118 case HW_EVENT_ERR_CORRECTED:
119 return "Corrected";
120 case HW_EVENT_ERR_UNCORRECTED:
121 return "Uncorrected";
122 case HW_EVENT_ERR_FATAL:
123 return "Fatal";
124 default:
125 case HW_EVENT_ERR_INFO:
126 return "Info";
127 }
128}
129
114/** 130/**
115 * enum mem_type - memory types. For a more detailed reference, please see 131 * enum mem_type - memory types. For a more detailed reference, please see
116 * http://en.wikipedia.org/wiki/DRAM 132 * http://en.wikipedia.org/wiki/DRAM
diff --git a/include/ras/ras_event.h b/include/ras/ras_event.h
index 260470e72483..21cdb0b7b0fb 100644
--- a/include/ras/ras_event.h
+++ b/include/ras/ras_event.h
@@ -78,9 +78,7 @@ TRACE_EVENT(mc_event,
78 78
79 TP_printk("%d %s error%s:%s%s on %s (mc:%d location:%d:%d:%d address:0x%08lx grain:%d syndrome:0x%08lx%s%s)", 79 TP_printk("%d %s error%s:%s%s on %s (mc:%d location:%d:%d:%d address:0x%08lx grain:%d syndrome:0x%08lx%s%s)",
80 __entry->error_count, 80 __entry->error_count,
81 (__entry->error_type == HW_EVENT_ERR_CORRECTED) ? "Corrected" : 81 mc_event_error_type(__entry->error_type),
82 ((__entry->error_type == HW_EVENT_ERR_FATAL) ?
83 "Fatal" : "Uncorrected"),
84 __entry->error_count > 1 ? "s" : "", 82 __entry->error_count > 1 ? "s" : "",
85 ((char *)__get_str(msg))[0] ? " " : "", 83 ((char *)__get_str(msg))[0] ? " " : "",
86 __get_str(msg), 84 __get_str(msg),