Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3428560imu; Sun, 11 Nov 2018 14:53:49 -0800 (PST) X-Google-Smtp-Source: AJdET5e89oEWjnxLIlhFzlvfItPeVOu3cVi9NNV0pIIgopZ4paf0JypCRmzY/h5EjdherzteDBLB X-Received: by 2002:a62:3101:: with SMTP id x1-v6mr18226581pfx.204.1541976829493; Sun, 11 Nov 2018 14:53:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541976829; cv=none; d=google.com; s=arc-20160816; b=GunW2Ktt3AtvsdmaI+/Dy4PzmuQ8XDVpzTZ3ZvSnwig0Q25r+ItjzAgvCSjmYCQoJv 6FhH5JWURiDZUczoZSKKp2WOn9OY7CRtHxc9Ozlfb2XVjG1Ig8XOU5Vu2BCBpJtB3f0I nmZeoaRAbvGG854t87xA8O2ysSPMBlVGjn/5A8se9LrXWt8LAmxdOYZBKSpx5QhQGkUd UvC/3/9uFYXEPCFTH81s0BWLJgmCMWvZscfB2ofPsUA8gw2FIeQ4Wj2WineFqcndn+RK QbSduH3x/bhHZCsWT82KCTVSk1Y24XM15ajS61g/GIETdvkYRDbWadtyzvA+9fCtKQXi ghRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=EyDQmff/x8ma8W6Zos+TrrDJEx6sv1fSsy1AdVd44tU=; b=SAV5IaO1It4HFZYH5NBJGqDexgrOvAleIUoJCVltKlEZyOd2JByDY0UaboPlajCEcF +jbb4zSFN7DYAaB2tAdpKOwMxarfY/rSyKhOTd5u68qLpeEm8Zil9sZWT5SN09FR0xF0 DHyg13eUk01nxHjVtP6muBQ5nrmPKfrThv2FdW8+sxG9S2m9Usi66TrDoMpud/SK+VWx yjQ+tMkM3WEz+v+xDNCtMtL6xJaSFGNKZeUfaKMopGAQrkRCJCHcmlaZa/OSfS0cPzn+ ZT03NwhQrbsTODuy3cfyKz1cLbyZ//p5qPCpthe0Yl+Z4kUL3/1enI+ZCSwuGQonEozs deLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RW9sMLgO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t74si3862418pgc.150.2018.11.11.14.53.34; Sun, 11 Nov 2018 14:53:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RW9sMLgO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404055AbeKLIXB (ORCPT + 99 others); Mon, 12 Nov 2018 03:23:01 -0500 Received: from mail.kernel.org ([198.145.29.99]:54672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404025AbeKLIXA (ORCPT ); Mon, 12 Nov 2018 03:23:00 -0500 Received: from localhost (unknown [206.108.79.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C27C221780; Sun, 11 Nov 2018 22:33:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975582; bh=e/tnfNPI4oZPf/VfwGTJ/A6T8avdAFuA3qAxpOszOQo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RW9sMLgO+1Xqr7nSQoGaElMfQm86jMJ6m/RcizLqvhC0svgNXELPZZNx4ozWWi53l +77R6ZDR/n33vvnigLXNNZo9SZhHXe2pdBRUNGHznBlCY/Wz3c5lr5Z2l4gfQ7DxW9 f3uLgfelSFh/fVAKHRcWi22BLTnkPDqqPWlU1qXw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tony Luck , Borislav Petkov , Aristeu Rozanski , Mauro Carvalho Chehab , Qiuxu Zhuo , linux-edac Subject: [PATCH 4.14 143/222] EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting Date: Sun, 11 Nov 2018 14:24:00 -0800 Message-Id: <20181111221700.280195206@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221647.665769131@linuxfoundation.org> References: <20181111221647.665769131@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tony Luck commit 432de7fd7630c84ad24f1c2acd1e3bb4ce3741ca upstream. The count of errors is picked up from bits 52:38 of the machine check bank status register. But this is the count of *corrected* errors. If an uncorrected error is being logged, the h/w sets this field to 0. Which means that when edac_mc_handle_error() is called, the EDAC core will carefully add zero to the appropriate uncorrected error counts. Signed-off-by: Tony Luck [ Massage commit message. ] Signed-off-by: Borislav Petkov Cc: stable@vger.kernel.org Cc: Aristeu Rozanski Cc: Mauro Carvalho Chehab Cc: Qiuxu Zhuo Cc: linux-edac Link: http://lkml.kernel.org/r/20180928213934.19890-1-tony.luck@intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/edac/i7core_edac.c | 1 + drivers/edac/sb_edac.c | 1 + drivers/edac/skx_edac.c | 1 + 3 files changed, 3 insertions(+) --- a/drivers/edac/i7core_edac.c +++ b/drivers/edac/i7core_edac.c @@ -1711,6 +1711,7 @@ static void i7core_mce_output_error(stru u32 errnum = find_first_bit(&error, 32); if (uncorrected_error) { + core_err_cnt = 1; if (ripv) tp_event = HW_EVENT_ERR_FATAL; else --- a/drivers/edac/sb_edac.c +++ b/drivers/edac/sb_edac.c @@ -2891,6 +2891,7 @@ static void sbridge_mce_output_error(str recoverable = GET_BITFIELD(m->status, 56, 56); if (uncorrected_error) { + core_err_cnt = 1; if (ripv) { type = "FATAL"; tp_event = HW_EVENT_ERR_FATAL; --- a/drivers/edac/skx_edac.c +++ b/drivers/edac/skx_edac.c @@ -895,6 +895,7 @@ static void skx_mce_output_error(struct recoverable = GET_BITFIELD(m->status, 56, 56); if (uncorrected_error) { + core_err_cnt = 1; if (ripv) { type = "FATAL"; tp_event = HW_EVENT_ERR_FATAL;