EDAC, skx: Let EDAC core show the decoded result for debugfs
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Fri, 16 Nov 2018 07:35:05 +0000 (15:35 +0800)
committerBorislav Petkov <bp@suse.de>
Fri, 16 Nov 2018 10:19:53 +0000 (11:19 +0100)
commitfa1c071c1efb28baef2409e28c186d40c76d7839
tree3e6e525617d11b3c87eff5788f84610b84e2dbef
parent85b9c8bfee67ed151c44861c71adc816fc1b46a9
EDAC, skx: Let EDAC core show the decoded result for debugfs

Current debugfs shows the decoded result in its own print format which
is inconvenient for analysis/statistics.

Use skx_mce_check_error() instead of skx_decode() for debugfs,
then the decoded result is showed via EDAC core in a more readable
format like "CPU_SrcID#[0-9]_MC#[0-9]_Chan#[0-9]_DIMM#[0-9]".

Print a warning the first time this interface is used so the
administrator can see the console log that error(s) have been faked.

Co-developed-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: arozansk@redhat.com
CC: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1542353705-13531-1-git-send-email-qiuxu.zhuo@intel.com
drivers/edac/skx_edac.c