Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5461030imm; Tue, 21 Aug 2018 12:06:20 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxya5KIxHs/4VTfp94fe24qk/vS6kf0cSWb1iZi0Qtq3ciMS2uANWcpOd8p13MrpEOARo9M X-Received: by 2002:a17:902:bf44:: with SMTP id u4-v6mr51537108pls.84.1534878380052; Tue, 21 Aug 2018 12:06:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534878380; cv=none; d=google.com; s=arc-20160816; b=i8EIGd32xG08ZsWxZqMEjZQHj8cvLLd6mhPo/AXLE7EvxRYlFEgmmkwGBRAMYAowjM C2nGQ/D+/rPV1PqhW2hOb/haIUj918KdHyR9dC0TDkoFtlGcp1duXiNvx4O+IxEGA/Jj iBCSljEbgD4dk71HaLnxqhu3QpsRLQzuvUNVIu+Eq0QsqmlpUtiPX9rfQA/5sPONd9Ob Rbgf5nZqBH4oo/kUJbmhSzelyeCHXGV6U9BKmihBbcK9KFM8W+NXPNABnBluL59Xgb1n GB2dIFfu3q2C0kPiUI31DZbhoowGT4eY9rv1yTMtk0Reg2pic9TvIUFGcZBkk0bO0Qvl CfSQ== 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=2y7fWooa0l8OV6LFqQGuBOCg5lfYEFte5tXG+cCD8fw=; b=h9FabMH7X8MWpZJVgfbIyyMYJeak+sx732n5NYTURCj6QgH15d/h28K/nxpMlpy+ej Yl/1OwRJ5EB45UNI7FgAvnwwlOeliqQJoiKrzFkk57r21K5c3LPEyuoXxMM83E3FNYY4 kyct2hY9K3Kiyb/wq2JA0btgMZtHbn3fMXAVbTSPoJJRJ+LDlKxcIX2fDOMu3LhZJK4G KonfZVf/cKcVv39OrwfNXej9rKrlb6zPQkZVlvtrCZuKyiu/UqhjxxN72jrZwQGyGlTC fhZ4ReogmxdOX3WFCCcvQ36+U0skkhkwLBoxBwbpPkBexHc/Vheslg0o8R9sPZKWtCZj F2XA== 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 z18-v6si13503008pfl.209.2018.08.21.12.06.04; Tue, 21 Aug 2018 12:06:20 -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 S1727655AbeHUV25 (ORCPT + 99 others); Tue, 21 Aug 2018 17:28:57 -0400 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:33746 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726898AbeHUV25 (ORCPT ); Tue, 21 Aug 2018 17:28:57 -0400 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id C03418277C; Tue, 21 Aug 2018 20:07:43 +0200 (CEST) Date: Tue, 21 Aug 2018 20:07:43 +0200 From: Pavel Machek To: Borislav Petkov Cc: Paolo Bonzini , Pu Wen , tglx@linutronix.de, mingo@redhat.com, hpa@zytor.com, x86@kernel.org, thomas.lendacky@amd.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: <20180821180743.GA14431@atrey.karlin.mff.cuni.cz> References: <6275a5a0a0cfbd2c1abc09a5bb41caabecd02e27.1534599097.git.puwen@hygon.cn> <20180821081331.GC24940@nazgul.tnic> <20180821112020.GB29972@nazgul.tnic> <6e17958a-6cd8-4c6c-c890-f5f48b084d6f@redhat.com> <20180821130430.GB30528@nazgul.tnic> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180821130430.GB30528@nazgul.tnic> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > On Tue, Aug 21, 2018 at 01:26:13PM +0200, Paolo Bonzini wrote: > > But then I don't see the point of adding the Hygon vendor, since any > > check can be simplified: > > I think Hygon wanted to superficially show it is not really an AMD. For > example, the Hygon thing doesn't do SME/SEV. AFAIK. > > So we can just as well check only family but I'd say the vendor thing is > laying the grounds for the future where reportedly it will differ more > from an AMD. And then we can start splitting code more based on vendor > and not look at family at all. > > But for right now I think we should strive to keep the changes as small > as possible and only do real splitting when they start adding new > functionality. Which would mean having a hygon_edac.c too, for example. > > All, IMHO, of course. Sharing code between vendors is always yucky. Dunno, people do not know that 0x18 is reserved on AMD, so resulting code is quite confusing. Explicit vendor check is way to go, long term. Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html