Received: by 10.213.65.68 with SMTP id h4csp571141imn; Wed, 28 Mar 2018 08:46:08 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/oNvnxq908YjYDbMsLiGAtVWy+HpWNbsqdgOtv7Dzg8nCu1IDDlguuo25s+mywOSP94Ery X-Received: by 2002:a17:902:549:: with SMTP id 67-v6mr4485243plf.276.1522251968802; Wed, 28 Mar 2018 08:46:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522251968; cv=none; d=google.com; s=arc-20160816; b=H3YuVhDZCYtLnBT3QZWeEsOhEJB4T4UxYFEI2ixtq33id7TCeMs6FEqsWPaJNzd05y wlCsuw2wI0oSB6hsW4NbuKyjzti67ekOwVHTvrZSjfOeOs0DwO47elgjm5LiY6jtETSp LZUgGOfzqT63YwTIkQ4tuNbppLfPgZ0zy6gGJvXAvnnhFWlvHxubWHsR+50LvU1A5XFD 59nYCSZwvCgczUo47ZScnCnQ/mjWOSanFYCQZ7majoSDtFDRhBNOk2P/U0dBH7WbNPY/ mR0fH1x7OxUWsj+ai+bQk8CzCukb56D/7LU3meV4p2xXToDbLpy4OVl3yblrHKQgrPE8 9Yvg== 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=QiqCPy8MRIgbgw0mKJdaNEyzuID12KfFPsCpSR5hFL4=; b=IchSERr7B9PXaSLnqfxYtuDHyfRB5myG5n5KakzP3Xecg8ReIqQiwO8cwLF2wOJkL8 MuOiCD28IunpGi0dnn2oUx1u1shfx7YuzsX+C1C64RC3U5IRwTz+k0tCfaksVmrRixr1 BFF0DMo4hL2gKXxw+9cz6HyNeSjvWJ/L4lQz/V8AZGnzllnEJ0swOqn2//dLXQTsPqh+ WPPyU0xyHH/d9zhc42roCye74AhUR/BTgTqIoAYdqNwCYujtIFUdcvEQjURolUacdtXN aPaFoIDwcwBDxSP+YeNdvnpYCgxIqu5eiJA96PlssJ6ObEBFlhe3dwsIVZ/+aCuUivhq oOWw== 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 x185si2600816pgb.649.2018.03.28.08.45.53; Wed, 28 Mar 2018 08:46:08 -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 S1754134AbeC1Por (ORCPT + 99 others); Wed, 28 Mar 2018 11:44:47 -0400 Received: from mail.skyhub.de ([5.9.137.197]:55492 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753970AbeC1Poq (ORCPT ); Wed, 28 Mar 2018 11:44:46 -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 r6dERvndsck1; Wed, 28 Mar 2018 17:44:29 +0200 (CEST) Received: from pd.tnic (p200300EC2BC91000C8A6EDA20E8964B3.dip0.t-ipconnect.de [IPv6:2003:ec:2bc9:1000:c8a6:eda2:e89:64b3]) (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 F39601EC0339; Wed, 28 Mar 2018 17:44:28 +0200 (CEST) Date: Wed, 28 Mar 2018 17:43:49 +0200 From: Borislav Petkov To: "Ghannam, Yazen" Cc: "linux-edac@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 1/3] EDAC/amd64: Print ECC enabled/disabled for nodes with enabled MCs Message-ID: <20180328154349.GD20533@pd.tnic> References: <20180321191335.7832-1-Yazen.Ghannam@amd.com> <20180328130028.GB20533@pd.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 28, 2018 at 02:38:11PM +0000, Ghannam, Yazen wrote: > In either of those cases we won't get to debug_display_dimm_sizes* > because we won't initialize the instance. So you move that code which accesses csrows up so that it has the required information to query DIMM state/presence. > /* Assume UMC MCA banks are enabled. */ > nb_mce_en = true; Also, I don't like that assumption. > This would work for Fam17h. For older systems I think we can look at > D18F2x94_dct[1:0][DisDramInterface] > > Or maybe we have a separate function to check for enabled memory controllers > before we check for ECC? The best would be to have a function which checks whether DIMMs are present on the node and act accordingly. You can pull up some of the work of caching registers which are used in debug_display_dimm_sizes* and use that info to get the required DIMM state upfront. Thx. -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.