From patchwork Fri Nov 22 05:57:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gong X-Patchwork-Id: 3221441 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A525AC045B for ; Fri, 22 Nov 2013 06:14:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD63F20794 for ; Fri, 22 Nov 2013 06:14:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F345620792 for ; Fri, 22 Nov 2013 06:13:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751526Ab3KVGN7 (ORCPT ); Fri, 22 Nov 2013 01:13:59 -0500 Received: from mga03.intel.com ([143.182.124.21]:21282 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852Ab3KVGN6 (ORCPT ); Fri, 22 Nov 2013 01:13:58 -0500 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga101.ch.intel.com with ESMTP; 21 Nov 2013 22:13:57 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,750,1378882800"; d="scan'208";a="431940793" Received: from gchen-sby.bj.intel.com (HELO localhost) ([10.238.158.82]) by fmsmga001.fm.intel.com with ESMTP; 21 Nov 2013 22:13:55 -0800 From: "Chen, Gong" To: tony.luck@intel.com, bp@alien8.de Cc: linux-acpi@vger.kernel.org, "Chen, Gong" Subject: [PATCH 1/2] ACPI, APEI, GHES: Remove strict check for memory error handling Date: Fri, 22 Nov 2013 00:57:04 -0500 Message-Id: <1385099825-31765-1-git-send-email-gong.chen@linux.intel.com> X-Mailer: git-send-email 1.8.4.3 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.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 Usually SCI is employed to handle corrected error, especially for memory corrected error but in fact SCI still can be used to handle any error like memory uncorrected error if BIOS enable it. For this situation, memory uncorrected error should be logged as corrected error does, too. Signed-off-by: Chen, Gong --- arch/x86/include/asm/mce.h | 3 +-- arch/x86/kernel/cpu/mcheck/mce-apei.c | 6 ++---- drivers/acpi/apei/ghes.c | 3 +-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index cbe6b9e..94b263f 100644 --- a/arch/x86/include/asm/mce.h +++ b/arch/x86/include/asm/mce.h @@ -244,7 +244,6 @@ static inline void mcheck_intel_therm_init(void) { } */ struct cper_sec_mem_err; -extern void apei_mce_report_mem_error(int corrected, - struct cper_sec_mem_err *mem_err); +extern void apei_mce_report_mem_error(struct cper_sec_mem_err *mem_err); #endif /* _ASM_X86_MCE_H */ diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c index cd8b166..f09da48 100644 --- a/arch/x86/kernel/cpu/mcheck/mce-apei.c +++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c @@ -37,13 +37,11 @@ #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(struct cper_sec_mem_err *mem_err) { struct mce m; - /* Only corrected MC is reported */ - if (!corrected || !(mem_err->validation_bits & - CPER_MEM_VALID_PHYSICAL_ADDRESS)) + if (!(mem_err->validation_bits & CPER_MEM_VALID_PHYSICAL_ADDRESS)) return; mce_setup(&m); diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c index 8ec37bb..039c23c 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(mem_err); #endif ghes_handle_memory_failure(gdata, sev); }