EDAC/amd64: Revert hi_addr_offset for Hygon family 18h model 4h
The HiAddrOffset is always the top 4 bits of normalized address, so revert the modification in commit0ac06d63
to the original implementation. Fixes:0ac06d63
("EDAC/amd64: Adjust address translation for Hygon family 18h model 4h") Signed-off-by: fuhao <fuh@hygon.cn> Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com> Reviewed-by: Bin Lai <robinlai@tencent.com> Signed-off-by: Jinliang Zheng <alexjlzheng@tencent.com> Reviewed-by: caelli <caelli@tencent.com> Signed-off-by: Jianping Liu <frankjpliu@tencent.com>
This commit is contained in:
parent
b799eb7121
commit
f687e8b76a
|
@ -722,12 +722,7 @@ int umc_normaddr_to_sysaddr(u64 norm_addr, u16 nid, u8 umc, u64 *sys_addr)
|
|||
|
||||
/* Remove HiAddrOffset from normalized address, if enabled: */
|
||||
if (tmp & BIT(0)) {
|
||||
u64 hi_addr_offset;
|
||||
|
||||
if (hygon_f18h_m4h())
|
||||
hi_addr_offset = (tmp & GENMASK_ULL(31, 18)) << 8;
|
||||
else
|
||||
hi_addr_offset = (tmp & GENMASK_ULL(31, 20)) << 8;
|
||||
u64 hi_addr_offset = (tmp & GENMASK_ULL(31, 20)) << 8;
|
||||
|
||||
if (norm_addr >= hi_addr_offset) {
|
||||
ret_addr -= hi_addr_offset;
|
||||
|
|
Loading…
Reference in New Issue