• Tony Luck's avatar
    x86/mce: Do not enter deferred errors into the generic pool twice · 8b38937b
    Tony Luck authored
    We used to have a special ring buffer for deferred errors that
    was used to mark problem pages. We replaced that with a generic
    pool. Then later converted mce_log() to also use the same pool.
    As a result, we end up adding all deferred errors to the pool
    twice.
    
    Rearrange this code. Make sure to set the m.severity and
    m.usable_addr fields for deferred errors. Then if flags and
    mca_cfg.dont_log_ce mean we call mce_log() we are done, because
    that will add this entry to the generic pool.
    
    If we skipped mce_log(), then we still want to take action for
    the deferred error, so add to the pool.
    
    Change the name of the boolean "error_logged" to "error_seen",
    we should set it whether of not we logged an error because the
    return value from machine_check_poll() is used to decide whether
    storms have subsided or not.
    Reported-by: default avatarGong Chen <gong.chen@linux.intel.com>
    Signed-off-by: default avatarTony Luck <tony.luck@intel.com>
    Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: linux-edac <linux-edac@vger.kernel.org>
    Link: http://lkml.kernel.org/r/1448350880-5573-2-git-send-email-bp@alien8.deSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    8b38937b
mce.c 59.8 KB