From patchwork Wed Oct 16 14:56: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: 3053691 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 11CC1BF924 for ; Wed, 16 Oct 2013 15:12:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E66B1204B0 for ; Wed, 16 Oct 2013 15:12:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C93442010C for ; Wed, 16 Oct 2013 15:12:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755494Ab3JPPMg (ORCPT ); Wed, 16 Oct 2013 11:12:36 -0400 Received: from mga14.intel.com ([143.182.124.37]:47940 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1759882Ab3JPPLc (ORCPT ); Wed, 16 Oct 2013 11:11:32 -0400 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga102.ch.intel.com with ESMTP; 16 Oct 2013 08:11:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.93,508,1378882800"; d="scan'208";a="411973843" Received: from gchen-sby.bj.intel.com (HELO localhost) ([10.238.158.212]) by fmsmga001.fm.intel.com with ESMTP; 16 Oct 2013 08:11:27 -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 v2 7/9] ACPI, APEI, CPER: Enhance memory reporting capability Date: Wed, 16 Oct 2013 10:56:04 -0400 Message-Id: <1381935366-11731-8-git-send-email-gong.chen@linux.intel.com> X-Mailer: git-send-email 1.8.4.rc3 In-Reply-To: <1381935366-11731-1-git-send-email-gong.chen@linux.intel.com> References: <1381935366-11731-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.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 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[] = {