x86/mce: Add a struct mce.kflags field
authorTony Luck <tony.luck@intel.com>
Fri, 14 Feb 2020 22:27:16 +0000 (14:27 -0800)
committerBorislav Petkov <bp@suse.de>
Tue, 14 Apr 2020 13:58:43 +0000 (15:58 +0200)
commit1de08dccd383482a3e88845d3554094d338f5ff9
tree26b284af17d822019a20c51c9336d4f496021930
parent9554bfe403bdfc084823df8695a01f28c680af61
x86/mce: Add a struct mce.kflags field

There can be many different subsystems register on the mce handler
chain. Add a new bitmask field and define values so that handlers can
indicate whether they took any action to log or otherwise handle an
error.

The default handler at the end of the chain can use this information to
decide whether to print to the console log.

Boris suggested a generic name and leaving plenty of spare bits for
possible future use.

 [ bp: Move flag bits to the internal mce.h header and use BIT_ULL(). ]

Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Tested-by: Tony Luck <tony.luck@intel.com>
Link: https://lkml.kernel.org/r/20200214222720.13168-4-tony.luck@intel.com
arch/x86/include/asm/mce.h
arch/x86/include/uapi/asm/mce.h