From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pavel Machek Subject: Re: [PATCH v4 15/16] driver/edac: enable Hygon support to AMD64 EDAC driver Date: Tue, 21 Aug 2018 20:07:43 +0200 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 Return-path: Content-Disposition: inline In-Reply-To: <20180821130430.GB30528@nazgul.tnic> Sender: linux-kernel-owner@vger.kernel.org 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 List-Id: linux-arch.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 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Date: Tue, 21 Aug 2018 20:07:43 +0200 From: Pavel Machek 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> Sender: linux-arch-owner@vger.kernel.org List-ID: 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 Message-ID: <20180821180743.HnPHtI0fr0jyVIFUE-kCEj1XVNpKYN9iGo6b340f_cU@z> > 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