Received: by 10.213.65.68 with SMTP id h4csp152123imn; Fri, 30 Mar 2018 02:56:32 -0700 (PDT) X-Google-Smtp-Source: AIpwx48kQD1x8RXAmE080NMxExNRRY1BqdI6jP+u9jy4UX9TvE0HM6ciU8F2PbKRx4Q4bTP3ef6/ X-Received: by 10.99.111.136 with SMTP id k130mr2774350pgc.378.1522403792527; Fri, 30 Mar 2018 02:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522403792; cv=none; d=google.com; s=arc-20160816; b=BaMWBZMNIpY5jjA2jeQDaVLLcRCQOPWapJH3Xqub3xq3gEOLNqYN5dSPr8wV6YO7H1 odWrvFCyjjSOt9+xg4sP11CccpzGEgbKcRRUh/fCn5SaqFarLFlQx9NfD+z0lL3I3xvK O8sdaiaLsS72CJ9i5DoaWS//EB8f8BVqbh7Iz9ctZg+cnuWyN9+6H9lVi5mlSrwZMdIi uykJwfjF+Uf5sgq6k/ldvFEDHQWY/HNyUfIqJw5zNMuAVJQnpfxBWfSNS+TEA3DctjUj YRKF9qtEUciL3cilyBN7kmBRwmIKP4pvQaWC0Kq9qhwpJPpGo+pfz+VC+KigRu6BmDqY B35Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:arc-authentication-results; bh=Ha9Xs2dVHgmirj5pvMvzacVw+v8OlE7ClsvIGGhKlWQ=; b=RgQ6sVwe26Zd9I4mEjsafYyCAOLtv4WQpkWpHYyQeLPvS8yhpfUcPkpyGimZimdmFe r8SzejdnjWjXLWFwuG5FKGfGJk9rdZBLN6lTZlxGQpKoKLLZKVnjMEpDS9TqwI7TkjW+ Pact8MrxOGhHVdWnEjT52v5SQnbthk+lE75oZ8bcuia7JLGOI1cTCyyXzzSle48ji94K Ku5nggcZpdI9OS4RJO+BoTFEM7qS29Pt/Vihya5yXZt1b3mRfr1K48TI/wHxl77ERGZY jTVqTvYvvCkH8sF/HyhV5Vs7YZptNXY8WgBwQuR24dvnQ2TKOzHR005lod0imYIGDTrW 0OWg== 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 d25si5227003pge.410.2018.03.30.02.56.18; Fri, 30 Mar 2018 02:56:32 -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 S1751434AbeC3Jyp (ORCPT + 99 others); Fri, 30 Mar 2018 05:54:45 -0400 Received: from zxshcas1.zhaoxin.com ([180.169.121.91]:11863 "EHLO ZXSHCAS1.zhaoxin.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751053AbeC3Jym (ORCPT ); Fri, 30 Mar 2018 05:54:42 -0400 Received: from zxbjmbx3.zhaoxin.com (10.29.252.165) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Fri, 30 Mar 2018 17:54:37 +0800 Received: from timguo-System-Product-Name.zhaoxin.com (10.29.8.54) 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; Fri, 30 Mar 2018 17:54:35 +0800 From: David Wang To: , , , , , , , CC: , , , , , , David Wang Subject: [PATCH 1/2] x86/mce: new centaur CPUs support MCE broadcasting Date: Fri, 30 Mar 2018 17:53:41 +0800 Message-ID: <1522403622-31146-2-git-send-email-davidwang@zhaoxin.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522403622-31146-1-git-send-email-davidwang@zhaoxin.com> References: <1522403622-31146-1-git-send-email-davidwang@zhaoxin.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.29.8.54] 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 This patch is used to tell the kernel that newer Centaur CPU support 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..82b25e1 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) 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)) && + cfg->monarch_timeout < 0) + cfg->monarch_timeout = USEC_PER_SEC; + } + if (cfg->monarch_timeout < 0) cfg->monarch_timeout = 0; if (cfg->bootlog != 0) -- 1.9.1