x86/mce: Fix mce=nobootlog
authorJan H. Schönherr <jschoenh@amazon.de>
Fri, 3 Jan 2020 15:07:18 +0000 (16:07 +0100)
committerBorislav Petkov <bp@suse.de>
Mon, 13 Jan 2020 09:07:56 +0000 (10:07 +0100)
commit90454e49593845e4f1cd162601249450b30898f3
tree1bd991e0bbc83c1ac7980d4a53e496dbc190b4a4
parent8438b84ab42d9a67df33633258e0865c5761d2d4
x86/mce: Fix mce=nobootlog

Since commit

  8b38937b7ab5 ("x86/mce: Do not enter deferred errors into the generic
 pool twice")

the mce=nobootlog option has become mostly ineffective (after being only
slightly ineffective before), as the code is taking actions on MCEs left
over from boot when they have a usable address.

Move the check for MCP_DONTLOG a bit outward to make it effective again.

Also, since commit

  011d82611172 ("RAS: Add a Corrected Errors Collector")

the two branches of the remaining "if" at the bottom of machine_check_poll()
do same. Unify them.

Signed-off-by: Jan H. Schönherr <jschoenh@amazon.de>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20200103150722.20313-3-jschoenh@amazon.de
arch/x86/kernel/cpu/mce/core.c