Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174475
b: refs/heads/master
c: bdc30a0
h: refs/heads/master
i:
  174473: c528a10
  174471: 1c916c4
v: v3
  • Loading branch information
Borislav Petkov committed Dec 8, 2009
1 parent c240eb7 commit 36b69d9
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 32 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bfc04aec7d687282b5e7adb26799d3eb50d05f01
refs/heads/master: bdc30a0c8c7427a1c1d2e4d149d372d4d77781ee
58 changes: 27 additions & 31 deletions trunk/drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1645,10 +1645,11 @@ static int f10_translate_sysaddr_to_cs(struct amd64_pvt *pvt, u64 sys_addr,
}

/*
* This the F10h reference code from AMD to map a @sys_addr to NodeID,
* CSROW, Channel.
* For reference see "2.8.5 Routing DRAM Requests" in F10 BKDG. This code maps
* a @sys_addr to NodeID, DCT (channel) and chip select (CSROW).
*
* The @sys_addr is usually an error address received from the hardware.
* The @sys_addr is usually an error address received from the hardware
* (MCX_ADDR).
*/
static void f10_map_sysaddr_to_csrow(struct mem_ctl_info *mci,
struct err_regs *info,
Expand All @@ -1661,39 +1662,34 @@ static void f10_map_sysaddr_to_csrow(struct mem_ctl_info *mci,

csrow = f10_translate_sysaddr_to_cs(pvt, sys_addr, &nid, &chan);

if (csrow >= 0) {
error_address_to_page_and_offset(sys_addr, &page, &offset);
if (csrow < 0) {
edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR);
return;
}

error_address_to_page_and_offset(sys_addr, &page, &offset);

syndrome = HIGH_SYNDROME(info->nbsl) << 8;
syndrome |= LOW_SYNDROME(info->nbsh);
syndrome = HIGH_SYNDROME(info->nbsl) << 8;
syndrome |= LOW_SYNDROME(info->nbsh);

/*
* We need the syndromes for channel detection only when we're
* ganged. Otherwise @chan should already contain the channel at
* this point.
*/
if (dct_ganging_enabled(pvt) && pvt->nbcfg & K8_NBCFG_CHIPKILL)
chan = get_channel_from_ecc_syndrome(mci, syndrome);

if (chan >= 0)
edac_mc_handle_ce(mci, page, offset, syndrome, csrow, chan,
EDAC_MOD_STR);
else
/*
* Is CHIPKILL on? If so, then we can attempt to use the
* syndrome to isolate which channel the error was on.
* Channel unknown, report all channels on this CSROW as failed.
*/
if (pvt->nbcfg & K8_NBCFG_CHIPKILL)
chan = get_channel_from_ecc_syndrome(mci, syndrome);

if (chan >= 0) {
for (chan = 0; chan < mci->csrows[csrow].nr_channels; chan++)
edac_mc_handle_ce(mci, page, offset, syndrome,
csrow, chan, EDAC_MOD_STR);
} else {
/*
* Channel unknown, report all channels on this
* CSROW as failed.
*/
for (chan = 0; chan < mci->csrows[csrow].nr_channels;
chan++) {
edac_mc_handle_ce(mci, page, offset,
syndrome,
csrow, chan,
EDAC_MOD_STR);
}
}

} else {
edac_mc_handle_ce_no_info(mci, EDAC_MOD_STR);
}
csrow, chan, EDAC_MOD_STR);
}

/*
Expand Down

0 comments on commit 36b69d9

Please sign in to comment.