diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 14:28:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-11 14:28:43 -0500 |
commit | 9ada9fd5dfaf0076eadf42cecc68f7adc1717c58 (patch) | |
tree | 543ef3147e5a63c1a877efbf2f1a9e0125273c85 /drivers/edac/edac_mc.c | |
parent | c45564e91604ca4d03505ba4d567541c7e4f86fe (diff) | |
parent | 3bfe5aae8edd8436d26cddfeab783492d8950821 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp
Pull EDAC fixes from Borislav Petkov:
- EDAC core error path fix, from Denis Kirjanov.
- Generalization of AMD MCE bank names and some minor error reporting
improvements.
- EDAC core cleanups and simplifications, from Wei Yongjun.
- amd64_edac fixes for sysfs-reported values, from Josh Hunt.
- some heavy amd64_edac error reporting path shaving, leading to
removing a bunch of code.
- amd64_edac error injection method improvements.
- EDAC core cleanups and fixes
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp: (24 commits)
EDAC, pci_sysfs: Use for_each_pci_dev to simplify the code
EDAC: Handle error path in edac_mc_sysfs_init() properly
MCE, AMD: Dump error status
MCE, AMD: Report decoded error type first
MCE, AMD: Dump CPU f/m/s triple with the error
MCE, AMD: Remove functional unit references
EDAC: Convert to use simple_open()
EDAC, Calxeda highbank: Convert to use simple_open()
EDAC: Fix mc size reported in sysfs
EDAC: Fix csrow size reported in sysfs
EDAC: Pass mci parent
EDAC: Add memory controller flags
amd64_edac: Fix csrows size and pages computation
amd64_edac: Use DBAM_DIMM macro
amd64_edac: Fix K8 chip select reporting
amd64_edac: Reorganize error reporting path
amd64_edac: Do not check whether error address is valid
amd64_edac: Improve error injection
amd64_edac: Cleanup error injection code
amd64_edac: Small fixlets and cleanups
...
Diffstat (limited to 'drivers/edac/edac_mc.c')
-rw-r--r-- | drivers/edac/edac_mc.c | 51 |
1 files changed, 27 insertions, 24 deletions
diff --git a/drivers/edac/edac_mc.c b/drivers/edac/edac_mc.c index 75c0a1a85fc3..281f566a5513 100644 --- a/drivers/edac/edac_mc.c +++ b/drivers/edac/edac_mc.c | |||
@@ -974,20 +974,22 @@ static void edac_ce_error(struct mem_ctl_info *mci, | |||
974 | long grain) | 974 | long grain) |
975 | { | 975 | { |
976 | unsigned long remapped_page; | 976 | unsigned long remapped_page; |
977 | char *msg_aux = ""; | ||
978 | |||
979 | if (*msg) | ||
980 | msg_aux = " "; | ||
977 | 981 | ||
978 | if (edac_mc_get_log_ce()) { | 982 | if (edac_mc_get_log_ce()) { |
979 | if (other_detail && *other_detail) | 983 | if (other_detail && *other_detail) |
980 | edac_mc_printk(mci, KERN_WARNING, | 984 | edac_mc_printk(mci, KERN_WARNING, |
981 | "%d CE %s on %s (%s %s - %s)\n", | 985 | "%d CE %s%son %s (%s %s - %s)\n", |
982 | error_count, | 986 | error_count, msg, msg_aux, label, |
983 | msg, label, location, | 987 | location, detail, other_detail); |
984 | detail, other_detail); | ||
985 | else | 988 | else |
986 | edac_mc_printk(mci, KERN_WARNING, | 989 | edac_mc_printk(mci, KERN_WARNING, |
987 | "%d CE %s on %s (%s %s)\n", | 990 | "%d CE %s%son %s (%s %s)\n", |
988 | error_count, | 991 | error_count, msg, msg_aux, label, |
989 | msg, label, location, | 992 | location, detail); |
990 | detail); | ||
991 | } | 993 | } |
992 | edac_inc_ce_error(mci, enable_per_layer_report, pos, error_count); | 994 | edac_inc_ce_error(mci, enable_per_layer_report, pos, error_count); |
993 | 995 | ||
@@ -1022,27 +1024,31 @@ static void edac_ue_error(struct mem_ctl_info *mci, | |||
1022 | const char *other_detail, | 1024 | const char *other_detail, |
1023 | const bool enable_per_layer_report) | 1025 | const bool enable_per_layer_report) |
1024 | { | 1026 | { |
1027 | char *msg_aux = ""; | ||
1028 | |||
1029 | if (*msg) | ||
1030 | msg_aux = " "; | ||
1031 | |||
1025 | if (edac_mc_get_log_ue()) { | 1032 | if (edac_mc_get_log_ue()) { |
1026 | if (other_detail && *other_detail) | 1033 | if (other_detail && *other_detail) |
1027 | edac_mc_printk(mci, KERN_WARNING, | 1034 | edac_mc_printk(mci, KERN_WARNING, |
1028 | "%d UE %s on %s (%s %s - %s)\n", | 1035 | "%d UE %s%son %s (%s %s - %s)\n", |
1029 | error_count, | 1036 | error_count, msg, msg_aux, label, |
1030 | msg, label, location, detail, | 1037 | location, detail, other_detail); |
1031 | other_detail); | ||
1032 | else | 1038 | else |
1033 | edac_mc_printk(mci, KERN_WARNING, | 1039 | edac_mc_printk(mci, KERN_WARNING, |
1034 | "%d UE %s on %s (%s %s)\n", | 1040 | "%d UE %s%son %s (%s %s)\n", |
1035 | error_count, | 1041 | error_count, msg, msg_aux, label, |
1036 | msg, label, location, detail); | 1042 | location, detail); |
1037 | } | 1043 | } |
1038 | 1044 | ||
1039 | if (edac_mc_get_panic_on_ue()) { | 1045 | if (edac_mc_get_panic_on_ue()) { |
1040 | if (other_detail && *other_detail) | 1046 | if (other_detail && *other_detail) |
1041 | panic("UE %s on %s (%s%s - %s)\n", | 1047 | panic("UE %s%son %s (%s%s - %s)\n", |
1042 | msg, label, location, detail, other_detail); | 1048 | msg, msg_aux, label, location, detail, other_detail); |
1043 | else | 1049 | else |
1044 | panic("UE %s on %s (%s%s)\n", | 1050 | panic("UE %s%son %s (%s%s)\n", |
1045 | msg, label, location, detail); | 1051 | msg, msg_aux, label, location, detail); |
1046 | } | 1052 | } |
1047 | 1053 | ||
1048 | edac_inc_ue_error(mci, enable_per_layer_report, pos, error_count); | 1054 | edac_inc_ue_error(mci, enable_per_layer_report, pos, error_count); |
@@ -1101,10 +1107,6 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type, | |||
1101 | */ | 1107 | */ |
1102 | for (i = 0; i < mci->n_layers; i++) { | 1108 | for (i = 0; i < mci->n_layers; i++) { |
1103 | if (pos[i] >= (int)mci->layers[i].size) { | 1109 | if (pos[i] >= (int)mci->layers[i].size) { |
1104 | if (type == HW_EVENT_ERR_CORRECTED) | ||
1105 | p = "CE"; | ||
1106 | else | ||
1107 | p = "UE"; | ||
1108 | 1110 | ||
1109 | edac_mc_printk(mci, KERN_ERR, | 1111 | edac_mc_printk(mci, KERN_ERR, |
1110 | "INTERNAL ERROR: %s value is out of range (%d >= %d)\n", | 1112 | "INTERNAL ERROR: %s value is out of range (%d >= %d)\n", |
@@ -1136,6 +1138,7 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type, | |||
1136 | grain = 0; | 1138 | grain = 0; |
1137 | p = label; | 1139 | p = label; |
1138 | *p = '\0'; | 1140 | *p = '\0'; |
1141 | |||
1139 | for (i = 0; i < mci->tot_dimms; i++) { | 1142 | for (i = 0; i < mci->tot_dimms; i++) { |
1140 | struct dimm_info *dimm = mci->dimms[i]; | 1143 | struct dimm_info *dimm = mci->dimms[i]; |
1141 | 1144 | ||
@@ -1203,6 +1206,7 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type, | |||
1203 | 1206 | ||
1204 | /* Fill the RAM location data */ | 1207 | /* Fill the RAM location data */ |
1205 | p = location; | 1208 | p = location; |
1209 | |||
1206 | for (i = 0; i < mci->n_layers; i++) { | 1210 | for (i = 0; i < mci->n_layers; i++) { |
1207 | if (pos[i] < 0) | 1211 | if (pos[i] < 0) |
1208 | continue; | 1212 | continue; |
@@ -1215,7 +1219,6 @@ void edac_mc_handle_error(const enum hw_event_mc_err_type type, | |||
1215 | *(p - 1) = '\0'; | 1219 | *(p - 1) = '\0'; |
1216 | 1220 | ||
1217 | /* Report the error via the trace interface */ | 1221 | /* Report the error via the trace interface */ |
1218 | |||
1219 | grain_bits = fls_long(grain) + 1; | 1222 | grain_bits = fls_long(grain) + 1; |
1220 | trace_mc_event(type, msg, label, error_count, | 1223 | trace_mc_event(type, msg, label, error_count, |
1221 | mci->mc_idx, top_layer, mid_layer, low_layer, | 1224 | mci->mc_idx, top_layer, mid_layer, low_layer, |