diff options
-rw-r--r-- | drivers/edac/amd64_edac.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 854c7c125035..2c869d1fe334 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -279,14 +279,11 @@ static struct mem_ctl_info *find_mc_by_sys_addr(struct mem_ctl_info *mci, | |||
279 | intlv_en = pvt->dram_IntlvEn[0]; | 279 | intlv_en = pvt->dram_IntlvEn[0]; |
280 | 280 | ||
281 | if (intlv_en == 0) { | 281 | if (intlv_en == 0) { |
282 | for (node_id = 0; ; ) { | 282 | for (node_id = 0; node_id < DRAM_REG_COUNT; node_id++) { |
283 | if (amd64_base_limit_match(pvt, sys_addr, node_id)) | 283 | if (amd64_base_limit_match(pvt, sys_addr, node_id)) |
284 | break; | 284 | goto found; |
285 | |||
286 | if (++node_id >= DRAM_REG_COUNT) | ||
287 | goto err_no_match; | ||
288 | } | 285 | } |
289 | goto found; | 286 | goto err_no_match; |
290 | } | 287 | } |
291 | 288 | ||
292 | if (unlikely((intlv_en != 0x01) && | 289 | if (unlikely((intlv_en != 0x01) && |
@@ -301,7 +298,7 @@ static struct mem_ctl_info *find_mc_by_sys_addr(struct mem_ctl_info *mci, | |||
301 | bits = (((u32) sys_addr) >> 12) & intlv_en; | 298 | bits = (((u32) sys_addr) >> 12) & intlv_en; |
302 | 299 | ||
303 | for (node_id = 0; ; ) { | 300 | for (node_id = 0; ; ) { |
304 | if ((pvt->dram_limit[node_id] & intlv_en) == bits) | 301 | if ((pvt->dram_IntlvSel[node_id] & intlv_en) == bits) |
305 | break; /* intlv_sel field matches */ | 302 | break; /* intlv_sel field matches */ |
306 | 303 | ||
307 | if (++node_id >= DRAM_REG_COUNT) | 304 | if (++node_id >= DRAM_REG_COUNT) |
@@ -311,10 +308,10 @@ static struct mem_ctl_info *find_mc_by_sys_addr(struct mem_ctl_info *mci, | |||
311 | /* sanity test for sys_addr */ | 308 | /* sanity test for sys_addr */ |
312 | if (unlikely(!amd64_base_limit_match(pvt, sys_addr, node_id))) { | 309 | if (unlikely(!amd64_base_limit_match(pvt, sys_addr, node_id))) { |
313 | amd64_printk(KERN_WARNING, | 310 | amd64_printk(KERN_WARNING, |
314 | "%s(): sys_addr 0x%lx falls outside base/limit " | 311 | "%s(): sys_addr 0x%llx falls outside base/limit " |
315 | "address range for node %d with node interleaving " | 312 | "address range for node %d with node interleaving " |
316 | "enabled.\n", __func__, (unsigned long)sys_addr, | 313 | "enabled.\n", |
317 | node_id); | 314 | __func__, sys_addr, node_id); |
318 | return NULL; | 315 | return NULL; |
319 | } | 316 | } |
320 | 317 | ||