Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp444215imm; Wed, 22 Aug 2018 06:59:12 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx16COXs7N7a7jYziJRRsE+N+Ecw+785NaZKqcuft3Uz5hBAhC2iDHJCbc/hxoP7t63y+F2 X-Received: by 2002:a63:e54b:: with SMTP id z11-v6mr24816603pgj.328.1534946352893; Wed, 22 Aug 2018 06:59:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534946352; cv=none; d=google.com; s=arc-20160816; b=lBd09cjX8BzBn7Yr+FD0K1jf2gHtiv0e5HNWqwNlaqqMD6qx1cZj1Ct/tYkdy78KQ1 Ot/VKZf+wvJqBN83JcF9Plx26IXdzJwwuWpMOop0uR21L1jEHaME6TaiXQ6d8m32ZGx2 8ehXwFau0wewvNp3jxOoj7VP2pZvbCIcTtmy6lnogIKd94fdGvsQZxk3UdGpFH0VXUFj uJsy9xwRDXljxUFWrkAsQs9Opf5agTwGq6phtHG+OimIMyJztcCIgAnpBUFa5a7wdHVe Rw2ekp4msgij9xRPIpHSBQXW9HYBbmoKE8q5Wje4TxBw4DXG3M8kjoPWDGX9ChDTpbFw uTbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=wRMhBVuNgCkstBoAqX9m1dluYUtZm+ZkwU1Nup+IEfQ=; b=DM4PjXh7xLQ7vyeKb9Vy12nKI98SLMQBRqzBAxk9rYJzRPgWnBu2wlzhZ2oLjNST/t RVI9sP+gJuzytYctGLPU/V0tDm9EYv1fSAEb6f/B2VhfsDTHgoFb4CsWuAl6QcZ6t56E TSWjNBS1HcKs+PBXoFdABA6HwnAwgjlETdNgeGJ72Uq9z2cSZQbC0lw3ait7JoucC6Js VvFoeK7hhKyvXJtNVwVcXg6s7/VueAQ4Kf3lMtb1s2ww68KeY86lpKhDY7mdn0zgmveN XY00gznWKHKWEQJdvePpXpjz4qMwV0EVz3luuJpWnhh8N9/8+wDMWY8qZyxh33f9Azug LjcQ== 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 32-v6si1711816plg.390.2018.08.22.06.58.57; Wed, 22 Aug 2018 06:59:12 -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 S1728975AbeHVQcc (ORCPT + 99 others); Wed, 22 Aug 2018 12:32:32 -0400 Received: from smtp20.cstnet.cn ([159.226.251.20]:56606 "EHLO cstnet.cn" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728946AbeHVQcb (ORCPT ); Wed, 22 Aug 2018 12:32:31 -0400 Received: from [172.20.20.131] (unknown [182.150.46.145]) by APP-10 (Coremail) with SMTP id tACowADHku0IYH1b6C5vAw--.24388S2; Wed, 22 Aug 2018 21:07:21 +0800 (CST) Subject: Re: [PATCH v4 15/16] driver/edac: enable Hygon support to AMD64 EDAC driver To: Borislav Petkov , Paolo Bonzini Cc: 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 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> From: Pu Wen Message-ID: <36de11c7-8448-2967-2032-ef31d8e8a979@hygon.cn> Date: Wed, 22 Aug 2018 21:07:20 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20180821130430.GB30528@nazgul.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CM-TRANSID: tACowADHku0IYH1b6C5vAw--.24388S2 X-Coremail-Antispam: 1UD129KBjvJXoWrKr43Aw48CFyxWrykCFW3KFg_yoW8JryUpF y3C348A390k3s8Crn2qa10gFWFvFykJw4UCasxXFW8ArZ0yFn2q3y5K3Z3uFyI9rnxWw4S qF4jvw1xGa4qvFJanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDU0xBIdaVrnRJUUUvEb7Iv0xC_Kw4lb4IE77IF4wAFF20E14v26r4j6ryUM7CY07I2 0VC2zVCF04k26cxKx2IYs7xG6rWj6s0DM7CIcVAFz4kK6r1j6r18M28lY4IEw2IIxxk0rw A2F7IY1VAKz4vEj48ve4kI8wA2z4x0Y4vE2Ix0cI8IcVAFwI0_Jr0_JF4l84ACjcxK6xII jxv20xvEc7CjxVAFwI0_Gr0_Cr1l84ACjcxK6I8E87Iv67AKxVWUJVW8JwA2z4x0Y4vEx4 A2jsIEc7CjxVAFwI0_Gr0_Gr1UM2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI 64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r106r15McIj6I8E87Iv67AKxVW8Jr0_Cr 1UMcvjeVCFs4IE7xkEbVWUJVW8JwACjcxG0xvEwIxGrwACI402YVCY1x02628vn2kIc2xK xwCYjI0SjxkI62AI1cAE67vIY487MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY6r 1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17CE b7AF67AKxVWUtVW8ZwCIc40Y0x0EwIxGrwCI42IY6xIIjxv20xvE14v26r1j6r1xMIIF0x vE2Ix0cI8IcVCY1x0267AKxVW8JVWxJwCI42IY6xAIw20EY4v20xvaj40_WFyUJVCq3wCI 42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E14v26r4j6r4UJbIYCTnIWI evJa73UjIFyTuYvjxUqoanUUUUU X-Originating-IP: [182.150.46.145] X-CM-SenderInfo: psxzv046klw03qof0z/ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018/8/21 21:04, Borislav Petkov wrote: > 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. Thanks for Boris's clarification. It's hard to find the balance between short term(sharing codes) and long term(splitting codes). Current I think we'd better try to follow the following way: For current version, we will try to minimize the modification and share codes, For later big modification, will try to split codes to make code path more clear. Regards Pu Wen