diff options
author | Rui Wang <ruiv.wang@gmail.com> | 2013-12-07 23:17:53 -0500 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2013-12-08 09:39:10 -0500 |
commit | 545104dd2ba0feb62544284ee1d6c98fe6ef8245 (patch) | |
tree | e785653c7c11a37048dccb0e0f70fa57a5687580 /include/trace/events/ras.h | |
parent | 853d9b18f1e861d37e9b271742329f8c1176eabe (diff) |
PCI, AER: Fix severity usage in aer trace event
There's inconsistency between dmesg and the trace event output.
When dmesg says "severity=Corrected", the trace event says
"severity=Fatal". What happens is that HW_EVENT_ERR_CORRECTED is
defined in edac.h:
enum hw_event_mc_err_type {
HW_EVENT_ERR_CORRECTED,
HW_EVENT_ERR_UNCORRECTED,
HW_EVENT_ERR_FATAL,
HW_EVENT_ERR_INFO,
};
while aer_print_error() uses aer_error_severity_string[] defined as:
static const char *aer_error_severity_string[] = {
"Uncorrected (Non-Fatal)",
"Uncorrected (Fatal)",
"Corrected"
};
In this case dmesg is correct because info->severity is assigned in
aer_isr_one_error() using the definitions in include/linux/ras.h:
Signed-off-by: Rui Wang <rui.y.wang@intel.com>
Acked-by: Ethan Zhao <ethan.kernel@gmail.com>
Link: http://lkml.kernel.org/r/CANVTcTaP18CiGOSEcX5Ch_wPw9mEhkgokfp+d+ZOMFD+Ce4juA@mail.gmail.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'include/trace/events/ras.h')
-rw-r--r-- | include/trace/events/ras.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/trace/events/ras.h b/include/trace/events/ras.h index 88b878383797..1c875ad1ee5f 100644 --- a/include/trace/events/ras.h +++ b/include/trace/events/ras.h | |||
@@ -5,7 +5,7 @@ | |||
5 | #define _TRACE_AER_H | 5 | #define _TRACE_AER_H |
6 | 6 | ||
7 | #include <linux/tracepoint.h> | 7 | #include <linux/tracepoint.h> |
8 | #include <linux/edac.h> | 8 | #include <linux/aer.h> |
9 | 9 | ||
10 | 10 | ||
11 | /* | 11 | /* |
@@ -63,10 +63,10 @@ TRACE_EVENT(aer_event, | |||
63 | 63 | ||
64 | TP_printk("%s PCIe Bus Error: severity=%s, %s\n", | 64 | TP_printk("%s PCIe Bus Error: severity=%s, %s\n", |
65 | __get_str(dev_name), | 65 | __get_str(dev_name), |
66 | __entry->severity == HW_EVENT_ERR_CORRECTED ? "Corrected" : | 66 | __entry->severity == AER_CORRECTABLE ? "Corrected" : |
67 | __entry->severity == HW_EVENT_ERR_FATAL ? | 67 | __entry->severity == AER_FATAL ? |
68 | "Fatal" : "Uncorrected", | 68 | "Fatal" : "Uncorrected, non-fatal", |
69 | __entry->severity == HW_EVENT_ERR_CORRECTED ? | 69 | __entry->severity == AER_CORRECTABLE ? |
70 | __print_flags(__entry->status, "|", aer_correctable_errors) : | 70 | __print_flags(__entry->status, "|", aer_correctable_errors) : |
71 | __print_flags(__entry->status, "|", aer_uncorrectable_errors)) | 71 | __print_flags(__entry->status, "|", aer_uncorrectable_errors)) |
72 | ); | 72 | ); |