From patchwork Mon Dec 16 14:51:29 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 3354311 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 228659F32E for ; Mon, 16 Dec 2013 14:51:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C137620148 for ; Mon, 16 Dec 2013 14:51:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 121AA20123 for ; Mon, 16 Dec 2013 14:51:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753963Ab3LPOvc (ORCPT ); Mon, 16 Dec 2013 09:51:32 -0500 Received: from mail.skyhub.de ([78.46.96.112]:45532 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753685Ab3LPOvb (ORCPT ); Mon, 16 Dec 2013 09:51:31 -0500 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1387205490; bh=UIth8pTnhaBdVyssbefP63fGD8Q1a7zW4Ea9bE7HXgU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=AcaYbA0rtHLoESS9bxxiSOzbIdEuNhy+Fjaeem pV7bHp+KU6adubEvM/1oMyR8bFvRCd60yg9jIUBYS+0wiOPRv6FqkHjjisVORQHYY84 wE1FcBUnvGzM9HwW0RTWH7yrCwVCbfLHZuF9XLZY0z1Ydw3wDj6lSlQrks5PtkDeJI= Received: from mail.skyhub.de ([127.0.0.1]) by localhost (door.skyhub.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id QLdxK77+ICyX; Mon, 16 Dec 2013 15:51:30 +0100 (CET) Received: from liondog.tnic (p54B7F091.dip0.t-ipconnect.de [84.183.240.145]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 41DCE1DA274; Mon, 16 Dec 2013 15:51:30 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alien8.de; s=alien8; t=1387205490; bh=UIth8pTnhaBdVyssbefP63fGD8Q1a7zW4Ea9bE7HXgU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=AcaYbA0rtHLoESS9bxxiSOzbIdEuNhy+Fjaeem pV7bHp+KU6adubEvM/1oMyR8bFvRCd60yg9jIUBYS+0wiOPRv6FqkHjjisVORQHYY84 wE1FcBUnvGzM9HwW0RTWH7yrCwVCbfLHZuF9XLZY0z1Ydw3wDj6lSlQrks5PtkDeJI= Received: by liondog.tnic (Postfix, from userid 1000) id 628DA1001D3; Mon, 16 Dec 2013 15:51:29 +0100 (CET) Date: Mon, 16 Dec 2013 15:51:29 +0100 From: Borislav Petkov To: "Chen, Gong" Cc: "Naveen N. Rao" , tony.luck@intel.com, linux-acpi@vger.kernel.org Subject: Re: [PATCH v2 1/2] ACPI, APEI, GHES: Remove strict check for memory error handling Message-ID: <20131216145129.GA9683@pd.tnic> References: <1385363701-12387-1-git-send-email-gong.chen@linux.intel.com> <529463BD.3070305@linux.vnet.ibm.com> <20131126093136.GA27271@gchen.bj.intel.com> <20131214134256.GC2823@gchen.bj.intel.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20131214134256.GC2823@gchen.bj.intel.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, Dec 14, 2013 at 08:42:56AM -0500, Chen, Gong wrote: > Will you pick up this patch in your RAS request pull? Applied, with commit message massaging and s/corrected/severity/ automatic variable change, version below: --- From: "Chen, Gong" Subject: [PATCH] ACPI, APEI, GHES: Do not report only correctable errors with SCI Currently SCI is employed to handle corrected errors, and memory corrected errors, more specifically but in fact SCI still can be used to handle any errors, e.g. uncorrected or even fatal ones if enabled by the BIOS. Enable logging for those kinds of errors too. Signed-off-by: Chen, Gong Acked-by: Naveen N. Rao Cc: Tony Luck Link: http://lkml.kernel.org/r/1385363701-12387-1-git-send-email-gong.chen@linux.intel.com [ Boris: massage commit message, rename automatic variable. ] Signed-off-by: Borislav Petkov --- arch/x86/kernel/cpu/mcheck/mce-apei.c | 14 ++++++++++---- drivers/acpi/apei/ghes.c | 3 +-- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c index de8b60a53f69..a1aef9533154 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-apei.c +++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c @@ -33,22 +33,28 @@ #include #include #include +#include #include #include "mce-internal.h" -void apei_mce_report_mem_error(int corrected, struct cper_sec_mem_err *mem_err) +void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err) { struct mce m; - /* Only corrected MC is reported */ - if (!corrected || !(mem_err->validation_bits & CPER_MEM_VALID_PA)) + if (!(mem_err->validation_bits & CPER_MEM_VALID_PA)) return; mce_setup(&m); m.bank = 1; - /* Fake a memory read corrected error with unknown channel */ + /* Fake a memory read error with unknown channel */ m.status = MCI_STATUS_VAL | MCI_STATUS_EN | MCI_STATUS_ADDRV | 0x9f; + + if (severity >= GHES_SEV_RECOVERABLE) + m.status |= MCI_STATUS_UC; + if (severity >= GHES_SEV_PANIC) + m.status |= MCI_STATUS_PCC; + m.addr = mem_err->physical_addr; mce_log(&m); mce_notify_irq(); diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index a30bc313787b..ce3683d93a13 100644 --- a/drivers/acpi/apei/ghes.c +++ b/drivers/acpi/apei/ghes.c @@ -453,8 +453,7 @@ static void ghes_do_proc(struct ghes *ghes, ghes_edac_report_mem_error(ghes, sev, mem_err); #ifdef CONFIG_X86_MCE - apei_mce_report_mem_error(sev == GHES_SEV_CORRECTED, - mem_err); + apei_mce_report_mem_error(sev, mem_err); #endif ghes_handle_memory_failure(gdata, sev); }