aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2011-01-13 08:57:34 -0500
committerBorislav Petkov <borislav.petkov@amd.com>2011-03-17 09:46:20 -0400
commite2f79dbdfbf4326fcec50a3c2568476df24b16b6 (patch)
tree296d1ef7795f06d986b7932d52dbe58baff704a8 /drivers/edac
parent95b0ef55cd8a8278b64c7ba98c29cda5f4e4b617 (diff)
amd64_edac: Correct node interleaving removal
When node interleaving is enabled, a subset of the addr[14:12] bits has to be removed in order to get the normalized DCT address of the DRAM channel. The actual number of bits to remove is determined by F1x[1, 0][7C:40][IntlvEn]. Do this correctly. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/amd64_edac.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 9ea1bb4a51e3..f3f4ee909ef5 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1406,10 +1406,10 @@ static int f10_match_to_this_node(struct amd64_pvt *pvt, int range,
1406 chan_addr = f10_get_norm_dct_addr(pvt, range, sys_addr, 1406 chan_addr = f10_get_norm_dct_addr(pvt, range, sys_addr,
1407 high_range, dct_sel_base); 1407 high_range, dct_sel_base);
1408 1408
1409 /* remove Node ID (in case of node interleaving) */ 1409 /* Remove node interleaving, see F1x120 */
1410 tmp = chan_addr & 0xFC0; 1410 if (intlv_en)
1411 1411 chan_addr = ((chan_addr >> (12 + hweight8(intlv_en))) << 12) |
1412 chan_addr = ((chan_addr >> hweight8(intlv_en)) & GENMASK(12, 47)) | tmp; 1412 (chan_addr & 0xfff);
1413 1413
1414 /* remove channel interleave and hash */ 1414 /* remove channel interleave and hash */
1415 if (dct_interleave_enabled(pvt) && 1415 if (dct_interleave_enabled(pvt) &&