aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2009-07-23 10:32:01 -0400
committerBorislav Petkov <borislav.petkov@amd.com>2009-09-14 12:58:37 -0400
commitecaf5606de65cdd04de5f526185fe28fb0df654e (patch)
tree5545f1d5f24128ecf51f028c04ed57970013b59a /drivers
parentb7225e4fc19ce27a594cb2b868ef151bf82f8f93 (diff)
amd64_edac: cleanup amd64_decode_bus_error
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/edac/amd64_edac.c35
1 files changed, 9 insertions, 26 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 75842f08db83..82f48ee90f11 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2283,42 +2283,26 @@ static void amd64_handle_ue(struct mem_ctl_info *mci,
2283} 2283}
2284 2284
2285static void amd64_decode_bus_error(struct mem_ctl_info *mci, 2285static void amd64_decode_bus_error(struct mem_ctl_info *mci,
2286 struct err_regs *info) 2286 struct err_regs *info, int ecc_type)
2287{ 2287{
2288 u32 ec = ERROR_CODE(info->nbsl); 2288 u32 ec = ERROR_CODE(info->nbsl);
2289 u32 xec = EXT_ERROR_CODE(info->nbsl); 2289 u32 xec = EXT_ERROR_CODE(info->nbsl);
2290 2290
2291 amd64_mc_printk(mci, KERN_ERR, 2291 pr_emerg(" Transaction type: %s(%s), %s, Cache Level: %s, %s\n",
2292 "BUS ERROR:\n" 2292 RRRR_MSG(ec), II_MSG(ec), TO_MSG(ec), LL_MSG(ec), PP_MSG(ec));
2293 " time-out(%s) mem or i/o(%s)\n"
2294 " participating processor(%s)\n"
2295 " memory transaction type(%s)\n"
2296 " cache level(%s) Error Found by: %s\n",
2297 TO_MSG(ec), II_MSG(ec), PP_MSG(ec), RRRR_MSG(ec), LL_MSG(ec),
2298 (info->nbsh & K8_NBSH_ERR_SCRUBER) ?
2299 "Scrubber" : "Normal Operation");
2300 2293
2301 2294
2302 /* Bail early out if this was an 'observed' error */ 2295 /* Bail early out if this was an 'observed' error */
2303 if (PP(ec) == K8_NBSL_PP_OBS) 2296 if (PP(ec) == K8_NBSL_PP_OBS)
2304 return; 2297 return;
2305 2298
2306 /* Parse out the extended error code for ECC events */ 2299 /* Do only ECC errors */
2307 switch (xec) { 2300 if (xec && xec != F10_NBSL_EXT_ERR_ECC)
2308 /* F10 changed to one Extended ECC error code */
2309 case F10_NBSL_EXT_ERR_RES: /* Reserved field */
2310 case F10_NBSL_EXT_ERR_ECC: /* F10 ECC ext err code */
2311 break;
2312
2313 default:
2314 amd64_mc_printk(mci, KERN_ERR, "NOT ECC: no special error "
2315 "handling for this error\n");
2316 return; 2301 return;
2317 }
2318 2302
2319 if (info->nbsh & K8_NBSH_CECC) 2303 if (ecc_type == 2)
2320 amd64_handle_ce(mci, info); 2304 amd64_handle_ce(mci, info);
2321 else if (info->nbsh & K8_NBSH_UECC) 2305 else if (ecc_type == 1)
2322 amd64_handle_ue(mci, info); 2306 amd64_handle_ue(mci, info);
2323 2307
2324 /* 2308 /*
@@ -2329,8 +2313,7 @@ static void amd64_decode_bus_error(struct mem_ctl_info *mci,
2329 * catastrophic. 2313 * catastrophic.
2330 */ 2314 */
2331 if (info->nbsh & K8_NBSH_OVERFLOW) 2315 if (info->nbsh & K8_NBSH_OVERFLOW)
2332 edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR 2316 edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR "Error Overflow");
2333 "Error Overflow set");
2334} 2317}
2335 2318
2336void amd64_decode_nb_mce(struct mem_ctl_info *mci, struct err_regs *regs, 2319void amd64_decode_nb_mce(struct mem_ctl_info *mci, struct err_regs *regs,
@@ -2397,7 +2380,7 @@ void amd64_decode_nb_mce(struct mem_ctl_info *mci, struct err_regs *regs,
2397 RRRR_MSG(ec), TT_MSG(ec), LL_MSG(ec)); 2380 RRRR_MSG(ec), TT_MSG(ec), LL_MSG(ec));
2398 } else if (BUS_ERROR(ec)) { 2381 } else if (BUS_ERROR(ec)) {
2399 pr_emerg(" Bus (Link/DRAM) error\n"); 2382 pr_emerg(" Bus (Link/DRAM) error\n");
2400 amd64_decode_bus_error(mci, regs); 2383 amd64_decode_bus_error(mci, regs, ecc);
2401 } else { 2384 } else {
2402 /* shouldn't reach here! */ 2385 /* shouldn't reach here! */
2403 amd64_mc_printk(mci, KERN_WARNING, 2386 amd64_mc_printk(mci, KERN_WARNING,