Received: by 10.192.165.156 with SMTP id m28csp1620137imm; Tue, 17 Apr 2018 02:29:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+t8FgDo0qKXazviQuBpz6rfpMivIcWCX5o9kqygyfhMVB8g8JBGpoIT2pnxx1JpiklHU/g X-Received: by 10.98.150.75 with SMTP id c72mr1334483pfe.62.1523957389212; Tue, 17 Apr 2018 02:29:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523957389; cv=none; d=google.com; s=arc-20160816; b=FU9pPqzaNB3TDMVo9XyFKtsH+tv9QIWEvrUMfsm1VuAxdEPXEZmdWgd+L2cpcH61jQ s0XcgqckX9DaXYV+etjpF8yqMb3d4CPUIPjt8xGJUgHstsg+0a5ePda4GBwzspkSKUga axKi/G2gdM38umRKnb5Iwilj02Ec1RKYdZ3m+I1zYY0A4HgKqDPZN+qw/Wst91QeT3NO u8I0gMbanZVIWmeE2Jf0vJ/O0QRM7m3nC+CVG+O6qhDpDv5qPIrMyJoeG9MP+a4B661M FG9KT6oS284gf31fQGR7+o/S4jmnh0CvtpvFJFu1KHyPmQg7yOtp8WwY4d7B3uwM1RmT MtXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=jGK2eLdKovDh1N9O7X4C9aEQNBtkTWUFl6lKkGGLOl8=; b=Q7/IBZKLVKcWeU8/06jN5rCwoEzQU9yit4tnbhUhHByWmcQF1FWIqKhByT7DU5rGzY 0/KpJ2ffyzyd8s8koli8razdRQE3OMrY4JKFd7ePt6E1BgihFFOGBK93pNaImxdS6NXB wgkRnOmL3KFZqkd6/9vIBwuOXNb6j5bD0IQ+xYLUnB8+m0EidkbrAk1zX2SpDgaHkciK fvvd8btbGgcEL12tW9Aj67GfZjkogh7G2tgwruq+CW/alJ/ez7PXCgzkpOoIaU4lWTdD XBGKqGO0scU3GvPVf0ELcU5wi8C+1F5onYg/K1i2LSPmsYAep54VkBRDZUljrb6Vnq+h cvbA== 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 s22-v6si4344992plp.216.2018.04.17.02.29.35; Tue, 17 Apr 2018 02:29:49 -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 S1752510AbeDQJ22 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 17 Apr 2018 05:28:28 -0400 Received: from zxshcas2.zhaoxin.com ([180.169.121.92]:16088 "EHLO ZXSHCAS2.zhaoxin.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751927AbeDQJ21 (ORCPT ); Tue, 17 Apr 2018 05:28:27 -0400 Received: from zxbjmbx3.zhaoxin.com (10.29.252.165) by ZXSHCAS2.zhaoxin.com (10.28.252.162) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Tue, 17 Apr 2018 17:28:24 +0800 Received: from TIMGUOE40 (10.29.8.18) by zxbjmbx3.zhaoxin.com (10.29.252.165) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Tue, 17 Apr 2018 17:28:23 +0800 From: David Wang To: 'Borislav Petkov' CC: , , , , , , , , , , , , Subject: Re: [PATCH v2 1/2] x86/mce: new Centaur CPUs support MCE broadcasting Date: Tue, 17 Apr 2018 17:27:55 +0800 Message-ID: <000101d3d62e$5dcbe6c0$1963b440$@zhaoxin.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8BIT X-Mailer: Microsoft Outlook 16.0 Thread-Index: AdPWKbZhUsVlAZZOT3SRjL+3rXm3aQ== Content-Language: zh-cn X-Originating-IP: [10.29.8.18] X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To zxbjmbx3.zhaoxin.com (10.29.252.165) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----邮件原件----- > 发件人: Borislav Petkov [mailto:bp@alien8.de] > 发送时间: 2018年4月16日 21:28 > 收件人: David Wang > 抄送: tony.luck@intel.com; tglx@linutronix.de; mingo@redhat.com; > hpa@zytor.com; x86@kernel.org; linux-edac@vger.kernel.org; linux- > kernel@vger.kernel.org; brucechang@via-alliance.com; > cooperyan@zhaoxin.com; qiyuanwang@zhaoxin.com; > benjaminpan@viatech.com; lukelin@viacpu.com; timguo@zhaoxin.com > 主题: Re: [PATCH v2 1/2] x86/mce: new Centaur CPUs support MCE > broadcasting > > On Mon, Apr 02, 2018 at 11:33:51AM +0800, David Wang wrote: > > This patch is used to tell the kernel that newer Centaur CPU support > > Avoid writing "This patch" in the commit message of a patch. It is > tautologically useless. > > > MCE broadcasting. > > > > Signed-off-by: David Wang > > --- > > arch/x86/kernel/cpu/mcheck/mce.c | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/arch/x86/kernel/cpu/mcheck/mce.c > > b/arch/x86/kernel/cpu/mcheck/mce.c > > index 7065846..c3db7ce 100644 > > --- a/arch/x86/kernel/cpu/mcheck/mce.c > > +++ b/arch/x86/kernel/cpu/mcheck/mce.c > > @@ -1688,6 +1688,17 @@ static int __mcheck_cpu_apply_quirks(struct > > cpuinfo_x86 *c) > > This code doesn't belong in the "apply_quirks" function but in > __mcheck_cpu_init_vendor(). Just add a X86_VENDOR_CENTAUR case > there. > > I know, I know, there's a similar Intel piece which does the same thing but all > that quirks code should go to the vendor-specific init functions and the quirks > function be deleted. One day when I get bored... > > > if (c->x86 == 6 && c->x86_model == 45) > > quirk_no_way_out = quirk_sandybridge_ifu; > > } > > + > > + if (c->x86_vendor == X86_VENDOR_CENTAUR) { > > + /* > > + * All newer Centaur CPUs support MCE broadcasting. Enable > > + * synchronization with a one second timeout. > > + */ > > + if ((c->x86 > 6 || (c->x86 == 6 && c->x86_model == 0xf && > > +c->x86_mask >=0xe)) && > > arch/x86/kernel/cpu/mcheck/mce.c: In function > ‘__mcheck_cpu_apply_quirks’: > arch/x86/kernel/cpu/mcheck/mce.c:1688:64: error: ‘struct cpuinfo_x86’ has > no member named ‘x86_mask’; did you mean ‘x86_model’? > if ((c->x86 > 6 || (c->x86 == 6 && c->x86_model == 0xf && c->x86_mask > >=0xe)) && > ^~~~~~~~ > x86_model > > and no, it needs to be x86_stepping. > > Also, > > ERROR: spaces required around that '>=' (ctx:WxV) > #40: FILE: arch/x86/kernel/cpu/mcheck/mce.c:1697: > + if ((c->x86 > 6 || (c->x86 == 6 && c->x86_model == 0xf > + && c->x86_mask >=0xe)) && > ^ > > Please integrate scripts/checkpatch.pl into your patch creation workflow. > Some of the warnings/errors *actually* make sense. > > Thx. > > -- > Regards/Gruss, > Boris. > > Good mailing practices for 400: avoid top-posting and trim the reply. I will send patch v3 to solve all questions you listed. Thx. --- David