]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
EDAC, sb_edac: Return early on ADDRV bit and address type test
authorQiuxu Zhuo <qiuxu.zhuo@intel.com>
Fri, 7 Sep 2018 23:08:27 +0000 (16:08 -0700)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:33 +0000 (13:16 +0100)
commitddfb1afc2b413ba2f3ee54be59340fcd7f30b630
treee99fdc44475abaf723735a2a95347ecc8388216d
parente75f7ff890a51e02bd91df35324eb579f7ef10d2
EDAC, sb_edac: Return early on ADDRV bit and address type test

BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit dcc960b225ceb2bd66c45e0845d03e577f7010f9 ]

Users of the mce_register_decode_chain() are called for every logged
error. EDAC drivers should check:

1) Is this a memory error? [bit 7 in status register]
2) Is there a valid address? [bit 58 in status register]
3) Is the address a system address? [bitfield 8:6 in misc register]

The sb_edac driver performed test "1" twice. Waited far too long to
perform check "2". Didn't do check "3" at all.

Fix it by moving the test for valid address from
sbridge_mce_output_error() into sbridge_mce_check_error() and add a test
for the type immediately after. Delete the redundant check for the type
of the error from sbridge_mce_output_error().

Signed-off-by: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: Aristeu Rozanski <aris@redhat.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: Qiuxu Zhuo <qiuxu.zhuo@intel.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/20180907230828.13901-2-tony.luck@intel.com
[ Re-word commit message. ]
Signed-off-by: Tony Luck <tony.luck@intel.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/edac/sb_edac.c