Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1730998imm; Thu, 19 Jul 2018 07:02:45 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfM6brRmLsdllitr+8FoygPe8M1F802uayfZC4BMKRVdl34J1oHLAWuCa6p1TKwNiy9Cobr X-Received: by 2002:a17:902:3a3:: with SMTP id d32-v6mr10269145pld.294.1532008965543; Thu, 19 Jul 2018 07:02:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532008965; cv=none; d=google.com; s=arc-20160816; b=0R5iUZDj1w/maioqyuFSH9qodzQ1pOme2wewGUEFhOVNd0QPf5U1JqmRtlfVH3grMr EwjTZH5c9PRjMnwwUnPaR4tcj7BlPMS5YXBy3lPEm9LzdFHjqnO451q7Lhm5HC3kkTT5 pKZ+RXAt2tZ7xQBtPU3GG0dZ+ZlXaEayN46RK1elY14NPnh3N1+KPueHnc6CnEYfce2r wd3M/yqhD40CjstejzNu1NUrijHC9McVVSaAb/AzAD64hv2O/vqHxvI3Ooyvf6bbEPTM dL91ncoE9LwXAD0P0weWZwD+bG4fuhFig+pFKlrmToY6qimSb61jCOIux6S6fkKRVtrT SXmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Km0cDPPhLB88UGV2ezprn1BYya5fmvOO5y9kkPXkHVA=; b=EJ2tQ/p+p93JCcF2F4mIlDCwBe5u34TJHnnECmx1HIWOPMaxbP9wkZD9H34icymM3W 2aGj1mLg5j3HDyRPlYmx7XmsQ7aJFBI3DkF3cLhXFMbktKF/NywqJZFsfhle0nvBDTiX 3gtHz6m3ohvAyQq+JIY6Co2OJ9Mg2YbA2p/6qc0MJM71JYy4lIbWTR2LiuotqmEKslYH HmbsrwXEfp7Hhf4ruTVQOcRtcsye6CEaRrGC/dy4JzxMT37zpuP0Wx29gPorJsqBzKOc YC1hddmjMjm3mJcKlnLRUxQh0mmwFAEkt4QxxnHs/jBPs6rOFGL7QX7ZhrEvhgH3Orsf lLMQ== ARC-Authentication-Results: i=1; mx.google.com; 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 z64-v6si5451262pgb.79.2018.07.19.07.02.30; Thu, 19 Jul 2018 07:02:45 -0700 (PDT) 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; 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 S1731645AbeGSOoc (ORCPT + 99 others); Thu, 19 Jul 2018 10:44:32 -0400 Received: from mail.skyhub.de ([5.9.137.197]:42404 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731442AbeGSOob (ORCPT ); Thu, 19 Jul 2018 10:44:31 -0400 X-Virus-Scanned: Nedap ESD1 at mail.skyhub.de Received: from mail.skyhub.de ([127.0.0.1]) by localhost (blast.alien8.de [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 6pmPNEiYkfxG; Thu, 19 Jul 2018 16:01:11 +0200 (CEST) Received: from nazgul.tnic (77-85-109-49.ip.btc-net.bg [77.85.109.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.skyhub.de (SuperMail on ZX Spectrum 128k) with ESMTPSA id 359931EC0136; Thu, 19 Jul 2018 16:01:11 +0200 (CEST) Date: Thu, 19 Jul 2018 16:01:02 +0200 From: Borislav Petkov To: Tyler Baicar , james.morse@arm.com Cc: mchehab@kernel.org, linux-edac@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] EDAC, ghes: Enable per-layer error reporting for ARM Message-ID: <20180719140102.GB25185@nazgul.tnic> References: <1531762009-15112-1-git-send-email-tbaicar@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <1531762009-15112-1-git-send-email-tbaicar@codeaurora.org> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 16, 2018 at 01:26:49PM -0400, Tyler Baicar wrote: > Enable per-layer error reporting for ARM systems so that the error > counters are incremented per-DIMM. > > On ARM systems that use firmware first error handling it is understood > that card=channel and module=DIMM on that channel. Populate that > information and enable per layer error reporting for ARM systems so that > the EDAC error counters are incremented based on DIMM number as per the > SMBIOS table rather than just incrementing the noinfo counters on the > memory controller. I guess. James? > Signed-off-by: Tyler Baicar > --- > drivers/edac/ghes_edac.c | 15 ++++++++++++--- > 1 file changed, 12 insertions(+), 3 deletions(-) > diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c > index 473aeec..e4c8b6e 100644 > --- a/drivers/edac/ghes_edac.c > +++ b/drivers/edac/ghes_edac.c > @@ -213,9 +213,18 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err) > strcpy(e->label, "unknown label"); > e->msg = pvt->msg; > e->other_detail = pvt->other_detail; > - e->top_layer = -1; > - e->mid_layer = -1; > - e->low_layer = -1; <----- newline here. > + if ((IS_ENABLED(CONFIG_ARM) || IS_ENABLED(CONFIG_ARM64)) > + && (mem_err->validation_bits & CPER_MEM_VALID_CARD) > + && (mem_err->validation_bits & CPER_MEM_VALID_MODULE)) { > + e->top_layer = mem_err->card; > + e->mid_layer = mem_err->module; > + e->low_layer = -1; > + e->enable_per_layer_report = true; > + } else { > + e->top_layer = -1; > + e->mid_layer = -1; > + e->low_layer = -1; > + } ditto. > *pvt->other_detail = '\0'; > *pvt->msg = '\0'; > > -- -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --