Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3475649imu; Sun, 11 Nov 2018 15:58:56 -0800 (PST) X-Google-Smtp-Source: AJdET5cKyq8rhSGSpWnTZhHrsyjRWIqxU8uCWy661KJwOa8TRYnW+gFHkKoHhFJoQuIpKM4jQN4K X-Received: by 2002:a63:62c3:: with SMTP id w186mr15794065pgb.345.1541980736332; Sun, 11 Nov 2018 15:58:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541980736; cv=none; d=google.com; s=arc-20160816; b=kpSQdoRuDsqZPx96iznfif7im/xXYs765mmU+EiGyTFQBaaBQhunwOXYEeTCOCJ1Ow rDvezP/paL8J/ZTmV0HTq4f+GC4XiVqLIci0E6BVQ4ZMGtA+ox9Yi2MMxnTrgnkG3yLY SNhJ12tbND+nAC46OswAWBh+tadxsl/uuHkJor/l5vY91L8ZyYTatSzntRVWnS5+ZcaO bTnMRLusqRptPWiB0xrnka2wLud+T/+ULx2q0nNSFI7J0OR03jBhDQ1mntGkoO+sKBUt M6m3qYS/4XKMiMSFw168obCYj6fD3cbdrNj4RaBYSR5C6UHSSt1AhgiZ8AEbNGtNV6m8 f5wA== 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=d8KCO/THVn8qGipHZdJDUEgg/4gdxOSL1Ub29ZwK//4=; b=Q7cMruCX46yPS+pkRMcmvTr6Y7U2iktuxAJaK3Kw0Xu3M8Q25ed5YSx/Rztp9pTzgh gHJT+xkNMhnjJdR3fDFCFlKlc5nzyEpOrQy715zPJfj2k9TCiDWpOHyXnnJxQ80eqBh3 wIOTPxA0uO177fPX4AWX/EzErH0APD4cHv6As9xStGBqZcz1u3OwQny0kvheoUz8sRS/ skkHG17KPxc6O56xJE7C0HPQOhjSCK/phmhy0qDg5jp90MwRMR3wvIVng9JUbTdrGYDz doasAkV8OyTJQMoZomXFzy/nF8gIa1mVQm/Ntt1pMBwDO9KHae58uoaHl3h5evroE52e kLww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=i7Xm1nHd; 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 z14si14897034pgj.73.2018.11.11.15.58.41; Sun, 11 Nov 2018 15:58:56 -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=i7Xm1nHd; 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 S1732625AbeKLJsm (ORCPT + 99 others); Mon, 12 Nov 2018 04:48:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:34210 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732437AbeKLISH (ORCPT ); Mon, 12 Nov 2018 03:18:07 -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 295A4216FD; Sun, 11 Nov 2018 22:28:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541975292; bh=sIy8gjCPF6YmSKbYkaiwbfRfa2iM6HTEW6uGA/bVnBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=i7Xm1nHdinCn4u1DPHCZQw/44E1/ASDNG8btEUEHR12DZagrlMJi0eDtP9/6nSo2M 9z/HqpHKVf5Tvq6tQ8X2/wQ7aHfGgRPPGds3+ADNYD8zt9RccpdLjw8Bfh9kvZF2Mf oH8dQGD9BlrZxDxiflTjW9m2Q/LUr7kQYQ0KBcU8= 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.19 235/361] EDAC, {i7core,sb,skx}_edac: Fix uncorrected error counting Date: Sun, 11 Nov 2018 14:19:42 -0800 Message-Id: <20181111221651.850222854@linuxfoundation.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181111221619.915519183@linuxfoundation.org> References: <20181111221619.915519183@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.19-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 @@ -2888,6 +2888,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 @@ -959,6 +959,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;