Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 72f158fe authored by Borislav Petkov's avatar Borislav Petkov
Browse files

amd64_edac: fix interleave enable tests



The pvt->dram_IntlvEn saves the 3 "Interleave Enable" bits already
right-shifted by 8 so the check in find_mc_by_sys_addr() by shifting the
values to the left 8 bits is wrong.

Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
parent 916d11b2
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -289,12 +289,12 @@ static struct mem_ctl_info *find_mc_by_sys_addr(struct mem_ctl_info *mci,
		goto found;
		goto found;
	}
	}


	if (unlikely((intlv_en != (0x01 << 8)) &&
	if (unlikely((intlv_en != 0x01) &&
		     (intlv_en != (0x03 << 8)) &&
		     (intlv_en != 0x03) &&
		     (intlv_en != (0x07 << 8)))) {
		     (intlv_en != 0x07))) {
		amd64_printk(KERN_WARNING, "junk value of 0x%x extracted from "
		amd64_printk(KERN_WARNING, "junk value of 0x%x extracted from "
			     "IntlvEn field of DRAM Base Register for node 0: "
			     "IntlvEn field of DRAM Base Register for node 0: "
			     "This probably indicates a BIOS bug.\n", intlv_en);
			     "this probably indicates a BIOS bug.\n", intlv_en);
		return NULL;
		return NULL;
	}
	}