Commit 35d80692 authored by Borislav Petkov's avatar Borislav Petkov

edac, mce: correct corenum reporting

Fix core number reporting with NB MCEs.
Signed-off-by: default avatarBorislav Petkov <borislav.petkov@amd.com>
parent f4054253
...@@ -310,10 +310,9 @@ void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors) ...@@ -310,10 +310,9 @@ void amd_decode_nb_mce(int node_id, struct err_regs *regs, int handle_errors)
if (regs->nbsh & K8_NBSH_ERR_CPU_VAL) if (regs->nbsh & K8_NBSH_ERR_CPU_VAL)
pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf)); pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf));
} else { } else {
pr_cont(", core: %d\n", ilog2((regs->nbsh & 0xf))); pr_cont(", core: %d\n", fls((regs->nbsh & 0xf) - 1));
} }
pr_emerg("%s.\n", EXT_ERR_MSG(xec)); pr_emerg("%s.\n", EXT_ERR_MSG(xec));
if (BUS_ERROR(ec) && nb_bus_decoder) if (BUS_ERROR(ec) && nb_bus_decoder)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment