Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp4817594imm; Tue, 21 Aug 2018 01:15:24 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwQNUUNL8atmhclOs78cv+J+Xhme9uVdnKwKjZZ/xK1fT4CaFaJeCcqOlgZNiktRGZCEY8n X-Received: by 2002:a62:9541:: with SMTP id p62-v6mr51640575pfd.152.1534839324777; Tue, 21 Aug 2018 01:15:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534839324; cv=none; d=google.com; s=arc-20160816; b=B3wGc1qLJ/+3zpq8PyPbNQQJ0TcQfyKDKxzWfeguQI7dojq8d2VKoROvblBtrlJUSo wY6WpVYr+DBTMjAWz93I1mLLikLhMFJOUqQJpaxIDXMSJU90kNQI4VslBlEnhpMxXXf4 g1be3pEEF90VKcdj4iCEzX8rfOCdrfUwY8RzeoopmsOr4JcxPf7R7KxeieC2+h/2V5Qt Iygo4Ej4gqkHAOYTMrHCecAZNdvJNKzAWuLlVfXLknMQKrxcoFKJeJg5ZFPybnpFG8Um AHorkvhK60kdcYl4d4LixaFuTIYg0evcQICy/0t0rZCdEnbLQQWdssllmk6hEaauctTh 0dNg== 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=flS8L4m2YSJfh6VS2iDNh+3rq7Dg+ipyO0OwkdHGbSM=; b=cTUn8PJ+jssy85JNMtY+ZfKJAayh7276uByT3Dyg6r7u5fq4FM/6yD5+yF+179HT+d ziV/RTAWr3PqX0yVcc3RY+icfzJfSea/DY41rNyl/m5dzi02Wg1rl/Bt+E7nXxDuAibv HoqZfWsHIkoU0edzvpPtQ2kxay+2HC5hb/VtQsS6ePz/2JJ+X3+nRGk/earvBP3MkhTL Vj3i133V2/fIGV+5EueKFszCnYbqDgqNSGWVIcFeBTaOgYpDAYrdvyuv6lhZEdKjaZoL +LFOR007sHso+hG+tvNG1vy1lBZdOtHUmRfFddDYdR7taBJElYH13gD6VcNFdH9E/CL+ 0bVw== 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 j1-v6si11747475pgh.160.2018.08.21.01.15.09; Tue, 21 Aug 2018 01:15:24 -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 S1726679AbeHULcj (ORCPT + 99 others); Tue, 21 Aug 2018 07:32:39 -0400 Received: from mail.skyhub.de ([5.9.137.197]:36944 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbeHULcj (ORCPT ); Tue, 21 Aug 2018 07:32:39 -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 KU4JCLVKIfs5; Tue, 21 Aug 2018 10:13:12 +0200 (CEST) Received: from nazgul.tnic (77-85-47-250.ip.btc-net.bg [77.85.47.250]) (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 10DE61EC044B; Tue, 21 Aug 2018 10:13:11 +0200 (CEST) Date: Tue, 21 Aug 2018 10:13:31 +0200 From: Borislav Petkov To: Pu Wen Cc: tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, thomas.lendacky@amd.com, pbonzini@redhat.com, mchehab@kernel.org, mikhail.jin@gmail.com, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-edac@vger.kernel.org Subject: Re: [PATCH v4 15/16] driver/edac: enable Hygon support to AMD64 EDAC driver Message-ID: <20180821081331.GC24940@nazgul.tnic> References: <6275a5a0a0cfbd2c1abc09a5bb41caabecd02e27.1534599097.git.puwen@hygon.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <6275a5a0a0cfbd2c1abc09a5bb41caabecd02e27.1534599097.git.puwen@hygon.cn> 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, Aug 20, 2018 at 12:14:58AM +0800, Pu Wen wrote: > To make AMD64 EDAC and MCE drivers working on Hygon platforms, add > vendor checking for Hygon by using the code path of AMD 0x17. Add a > vendor field to struct amd64_pvt and initialize it in per_family_init > for vendor checking. > > Also Hygon PCI Device ID DF_F0/DF_F6(0x1460/0x1466) of Host bridges > is needed for edac driver. > > Signed-off-by: Pu Wen > --- > drivers/edac/amd64_edac.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++- > drivers/edac/amd64_edac.h | 5 +++++ > drivers/edac/mce_amd.c | 15 +++++++++++++- > 3 files changed, 70 insertions(+), 2 deletions(-) > > diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c > index 18aeabb..3cefb25 100644 > --- a/drivers/edac/amd64_edac.c > +++ b/drivers/edac/amd64_edac.c > @@ -211,7 +211,8 @@ static int __set_scrub_rate(struct amd64_pvt *pvt, u32 new_bw, u32 min_rate) > > scrubval = scrubrates[i].scrubval; > > - if (pvt->fam == 0x17) { > + if (pvt->fam == 0x17 || > + (pvt->vendor == X86_VENDOR_HYGON && pvt->fam == 0x18)) { Didn't we say that AMD won't do family 0x18 so you don't need the vendor check? -- Regards/Gruss, Boris. ECO tip #101: Trim your mails when you reply. --