From patchwork Fri Oct 18 08:23:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gong X-Patchwork-Id: 3065181 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 DA5509F243 for ; Fri, 18 Oct 2013 08:41:10 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B9AB1204EC for ; Fri, 18 Oct 2013 08:41:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9C03B204E7 for ; Fri, 18 Oct 2013 08:41:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752635Ab3JRIjL (ORCPT ); Fri, 18 Oct 2013 04:39:11 -0400 Received: from mga09.intel.com ([134.134.136.24]:9454 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752512Ab3JRIjH (ORCPT ); Fri, 18 Oct 2013 04:39:07 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP; 18 Oct 2013 01:35:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,520,1378882800"; d="scan'208";a="421045760" Received: from gchen-sby.bj.intel.com (HELO localhost) ([10.238.158.212]) by orsmga002.jf.intel.com with ESMTP; 18 Oct 2013 01:39:04 -0700 From: "Chen, Gong" To: tony.luck@intel.com, bp@alien8.de, joe@perches.com, naveen.n.rao@linux.vnet.ibm.com, m.chehab@samsung.com Cc: arozansk@redhat.com, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, "Chen, Gong" Subject: [PATCH v3 7/9] ACPI, APEI, CPER: Enhance memory reporting capability Date: Fri, 18 Oct 2013 04:23:42 -0400 Message-Id: <1382084624-10857-8-git-send-email-gong.chen@linux.intel.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1382084624-10857-1-git-send-email-gong.chen@linux.intel.com> References: <1382084624-10857-1-git-send-email-gong.chen@linux.intel.com> 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, 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 After H/W error happens under FFM enabled mode, lots of information are shown but some important parts like DIMM location missed. This patch is used to show these extra fileds. Original-author: Tony Luck Signed-off-by: Chen, Gong Acked-by: Naveen N. Rao Acked-by: Borislav Petkov Reviewed-by: Mauro Carvalho Chehab --- drivers/acpi/apei/cper.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/acpi/apei/cper.c b/drivers/acpi/apei/cper.c index 946ef52..b1a8a55 100644 --- a/drivers/acpi/apei/cper.c +++ b/drivers/acpi/apei/cper.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -210,6 +211,8 @@ static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem) printk("%s""card: %d\n", pfx, mem->card); if (mem->validation_bits & CPER_MEM_VALID_MODULE) printk("%s""module: %d\n", pfx, mem->module); + if (mem->validation_bits & CPER_MEM_VALID_RANK_NUMBER) + printk("%s""rank: %d\n", pfx, mem->rank); if (mem->validation_bits & CPER_MEM_VALID_BANK) printk("%s""bank: %d\n", pfx, mem->bank); if (mem->validation_bits & CPER_MEM_VALID_DEVICE) @@ -232,6 +235,15 @@ static void cper_print_mem(const char *pfx, const struct cper_sec_mem_err *mem) etype < ARRAY_SIZE(cper_mem_err_type_strs) ? cper_mem_err_type_strs[etype] : "unknown"); } + if (mem->validation_bits & CPER_MEM_VALID_MODULE_HANDLE) { + const char *bank = NULL, *device = NULL; + dmi_memdev_name(mem->mem_dev_handle, &bank, &device); + if (bank != NULL && device != NULL) + printk("%s""DIMM location: %s %s", pfx, bank, device); + else + printk("%s""DIMM DMI handle: 0x%.4x", + pfx, mem->mem_dev_handle); + } } static const char *cper_pcie_port_type_strs[] = {