EDAC/igen6: Remove unnecessary XOR on the zero-valued interleave bit

When reconstructing the removed interleave bit from an inflated memory
slice address, where a zero was inserted at the interleave bit position,
it's unnecessary to XOR this zero-valued interleave bit.

Remove this unnecessary XOR operation. No functional changes intended.

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Link: https://patch.msgid.link/20260730024238.4096623-7-qiuxu.zhuo@intel.com
This commit is contained in:
Qiuxu Zhuo 2026-07-30 10:42:34 +08:00 committed by Tony Luck
parent 0361f576ec
commit a118a5e2f1

View File

@ -448,16 +448,16 @@ static u64 mem_addr_to_sys_addr(u64 maddr)
return maddr;
}
static u64 mem_slice_hash(u64 addr, u64 mask, u64 hash_init, int intlv_bit)
static u64 mem_slice_hash(u64 addr, u64 mask, u64 hash_init)
{
/* The interleave bit in @addr is a zero. */
u64 hash_addr = addr & mask, hash = hash_init;
u64 intlv = (addr >> intlv_bit) & 1;
int i;
for (i = 6; i < 20; i++)
hash ^= (hash_addr >> i) & 1;
return hash ^ intlv;
return hash;
}
static u64 tgl_err_addr_to_mem_addr(u64 eaddr, int mc)
@ -478,7 +478,7 @@ static u64 tgl_err_addr_to_mem_addr(u64 eaddr, int mc)
maddr = GET_BITFIELD(eaddr, intlv_bit, 63) << (intlv_bit + 1) |
GET_BITFIELD(eaddr, 0, intlv_bit - 1);
hash = mem_slice_hash(maddr, mask, mc, intlv_bit);
hash = mem_slice_hash(maddr, mask, mc);
return maddr | (hash << intlv_bit);
}