From: Borislav Petkov Date: Mon, 14 Dec 2009 18:34:35 +0000 (+0100) Subject: edac, mce: correct corenum reporting X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=35d8069234bacfab608d2d7571c2cb71a23c3fae;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git edac, mce: correct corenum reporting Fix core number reporting with NB MCEs. Signed-off-by: Borislav Petkov --- diff --git a/drivers/edac/edac_mce_amd.c b/drivers/edac/edac_mce_amd.c index c693fcc2213c..9965b8daca74 100644 --- a/drivers/edac/edac_mce_amd.c +++ b/drivers/edac/edac_mce_amd.c @@ -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) pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf)); } 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)); if (BUS_ERROR(ec) && nb_bus_decoder)