mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
edac, mce: Filter out invalid values
commit 5b89d2f9ac upstream.
Print the CPU associated with the error only when the field is valid.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a72fce0653
commit
ceb2ef9f73
@@ -311,9 +311,13 @@ 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)));
|
||||
}
|
||||
u8 assoc_cpus = regs->nbsh & 0xf;
|
||||
|
||||
if (assoc_cpus > 0)
|
||||
pr_cont(", core: %d", fls(assoc_cpus) - 1);
|
||||
|
||||
pr_cont("\n");
|
||||
}
|
||||
|
||||
pr_emerg("%s.\n", EXT_ERR_MSG(xec));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user