• Qiuxu Zhuo's avatar
    EDAC, sb_edac: Return early on ADDRV bit and address type test · dcc960b2
    Qiuxu Zhuo authored
    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: default avatarQiuxu 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: default avatarTony Luck <tony.luck@intel.com>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    dcc960b2
sb_edac.c 91.7 KB