提交 ad9c40b7 编写于 作者: H Hui Wang 提交者: Mauro Carvalho Chehab

edac: sb_edac: Fix a INTERLEAVE_MODE() misuse

We can identify dram interleave mode from the Dram Rule register
rather than Dram Interleave list register.

In this context, the reg of INTERLEAVE_MODE(reg) contains the Dram
Interleave list register, we can't get interleave mode from the reg,
while the variable interleave_mode saves the the mode got from the
Dram Rule register, so we use the variable to replace
INTERLEAVE_MDDE(reg) here.
Signed-off-by: NHui Wang <jason77.wang@gmail.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 22a5c27b
...@@ -923,7 +923,7 @@ static int get_memory_error_data(struct mem_ctl_info *mci, ...@@ -923,7 +923,7 @@ static int get_memory_error_data(struct mem_ctl_info *mci,
addr, addr,
limit, limit,
sad_way + 7, sad_way + 7,
INTERLEAVE_MODE(reg) ? "" : "XOR[18:16]"); interleave_mode ? "" : "XOR[18:16]");
if (interleave_mode) if (interleave_mode)
idx = ((addr >> 6) ^ (addr >> 16)) & 7; idx = ((addr >> 6) ^ (addr >> 16)) & 7;
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册