Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1188747pxb; Fri, 27 Aug 2021 03:25:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxAeBuAfVrb7yoZqJorKm9dDmGdKjXrZAIdnzsdltb7wRWji4EnAi/nfMp47MOrgnc50Op5 X-Received: by 2002:a05:6638:f87:: with SMTP id h7mr7318130jal.77.1630059946647; Fri, 27 Aug 2021 03:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630059946; cv=none; d=google.com; s=arc-20160816; b=UVYZnopPDb8C2NQJjxMgL0itXTZZCcid4DvTpbdU1oyhY2D8pNYBR5Hf93OBt4CF4E WOF45iFlCwhjp2X+Umbt7kkKCPucqvzonSVrYHiKgIfzzu1jwsIaxlNvK6Y3k27J62Ar kl0ACkVCnbB2JRSfZLrZ4F7hTdudvNhvQTbDe3sIJ2T3qDS4EynGUjmfmMAZkbe2P4Z0 u0xRxys3IP1AATKYy2H+KrqVcQBqmKcUoNZPZLID7crE/nRiyX/VAaUIoKjQKDt2eb7X 9K1B1v/eBL9N84iodWjD5/T4VwMQzoVPb631hb1AqpWgpd2auqqFQf6U/T+UJPYiHCDX fHOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ERetRLR05o0HloXkki1sLii2QLYDsQTiY2jD6cD50b8=; b=U3801g7trJ3pjFGvmjK4MivEzERpBGSH7bgRLulgXjYD0k+a30D0v5wPwjzHN4WrOj 3l//Kuu+bgXSI6OSsF1IRInkPb37OKpEDRSXss8V9H+mZ8ezKsLy06IyKmQxyUgnR8zR VcXvNJ/B16l+HE/lSuMecOdVlr+choFu2f2n2fdxTXfF0SPTwtmg9hNco11mVpyIENa3 Bn+tnyz8EhURHFWz5iE5o9A3NetLNoJw97Eq5VHmCQWNcwq4ZPua2BJY+3XkViBudHpA c9VY19q+c5Bb17OQak42nhYE+QQ+Jf9moPocu1enOzCW7tgltgEzIubJH9915Wx/+obG a2Zw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=LlnsrL3U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i11si6075597ilm.28.2021.08.27.03.25.34; Fri, 27 Aug 2021 03:25:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@alien8.de header.s=dkim header.b=LlnsrL3U; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=alien8.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245077AbhH0KYr (ORCPT + 99 others); Fri, 27 Aug 2021 06:24:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244724AbhH0KYq (ORCPT ); Fri, 27 Aug 2021 06:24:46 -0400 Received: from mail.skyhub.de (mail.skyhub.de [IPv6:2a01:4f8:190:11c2::b:1457]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA261C061757; Fri, 27 Aug 2021 03:23:57 -0700 (PDT) Received: from zn.tnic (p200300ec2f111700905bee0280016357.dip0.t-ipconnect.de [IPv6:2003:ec:2f11:1700:905b:ee02:8001:6357]) (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 4B1081EC0453; Fri, 27 Aug 2021 12:23:52 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alien8.de; s=dkim; t=1630059832; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:in-reply-to:in-reply-to: references:references; bh=ERetRLR05o0HloXkki1sLii2QLYDsQTiY2jD6cD50b8=; b=LlnsrL3U8HzSLDx2vhPyXWNMqqsTyKukwd8PDDanRJEcFWFnwO1PBVaocanZE2sYKFVLve 6LmVHMFUF1i44adflROL5UHtIxqc6Qu08+8CXOgpdjQSOk5R3dVg6H7etFyFCCr/tSMbW4 dir3dfwyZwjwakVsbyoM4VOOrCpmhkQ= Date: Fri, 27 Aug 2021 12:24:29 +0200 From: Borislav Petkov To: Naveen Krishna Chatradhi Cc: linux-edac@vger.kernel.org, x86@kernel.org, linux-kernel@vger.kernel.org, mchehab@kernel.org, Yazen.Ghannam@amd.com, Muralidhara M K Subject: Re: [PATCH v3 2/3] EDAC/mce_amd: Extract node id from MCA_IPID Message-ID: References: <20210806074350.114614-4-nchatrad@amd.com> <20210823185437.94417-1-nchatrad@amd.com> <20210823185437.94417-3-nchatrad@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20210823185437.94417-3-nchatrad@amd.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 24, 2021 at 12:24:36AM +0530, Naveen Krishna Chatradhi wrote: > On SMCA banks of the NONCPU nodes, the node id information is > available in MCA_IPID[47:44](InstanceIdHi). > > Signed-off-by: Muralidhara M K > Signed-off-by: Naveen Krishna Chatradhi > Reviewed-by: Yazen Ghannam > --- > Changes since v2: > 1. Modified subject and commit message > 2. Added Reviewed by Yazen Ghannam > > drivers/edac/mce_amd.c | 19 +++++++++++++++++-- > 1 file changed, 17 insertions(+), 2 deletions(-) > > diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c > index 27d56920b469..1398032ba25a 100644 > --- a/drivers/edac/mce_amd.c > +++ b/drivers/edac/mce_amd.c > @@ -1072,8 +1072,23 @@ static void decode_smca_error(struct mce *m) > if (xec < smca_mce_descs[bank_type].num_descs) > pr_cont(", %s.\n", smca_mce_descs[bank_type].descs[xec]); > > - if (bank_type == SMCA_UMC && xec == 0 && decode_dram_ecc) > - decode_dram_ecc(topology_die_id(m->extcpu), m); > + if (xec == 0 && decode_dram_ecc) { > + int node_id = 0; > + > + if (bank_type == SMCA_UMC) { > + node_id = topology_die_id(m->extcpu); > + } else if (bank_type == SMCA_UMC_V2) { > + /* > + * SMCA_UMC_V2 is used on the noncpu nodes, extract Above "NONCPU", here "noncpu", I don't like that "noncpu" nomenclature. I wonder if we can do without it... -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette