Received: by 10.213.65.68 with SMTP id h4csp1962003imn; Sun, 1 Apr 2018 20:35:35 -0700 (PDT) X-Google-Smtp-Source: AIpwx48/P/E7TNTPkf8TSBVjDeYbBJDtBpfFzirBcu9c5D8mUfEDZXGZjn3BCie0MABJfEQTN/F1 X-Received: by 10.167.129.24 with SMTP id b24mr6139776pfi.183.1522640135584; Sun, 01 Apr 2018 20:35:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522640135; cv=none; d=google.com; s=arc-20160816; b=E/IKHQ9NQDi6yqh663yny02/sF3Tnel8PDrIoghHThkdlV7MU8WI8+8LsIPrQbaJtw 3VKu8sy3ZnsNSmUtqJQJiUxAn05CTAW/UGJYoukTdCOLLDDb/oYCXl9d8PNICcnmzS5D UmAcyAEYXQ+aC9s3S3Azx2cUFTVUGYB0l9k4/o60T/4ddlMr1b/ys2BSxfaRG/gNxkhh BbtM/ZtYG9Y0TnxhMwQgKlOCpvJt+9T1tr7UKsPVWkcOfhAfWo3LcI6ZR+IxHen+Uf53 4IktwRtG92dzFG52H553ukFZWINy7XKA3rzp1ENGl2hneZ8nrh0LZHhLW+q1c45eWNOr /Xcg== 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=w62dJpZWgiEzzTY5+ZVszCR4ESsHQUKPREcA2L6AH48=; b=YOfq49naEO2QiV2xQoDg5pOfYh3VsEQyeGDwO973g8N3aeA/NqkjTlVwhN75eS9t3o eomyn5XLNfw6sfuJNNAUkbuHesednKRaCjcg7aTGJV9jBXjdcWfIXFQLKjO3VkuIAjPD FDqNDyGhQsbTJ8x3Zq7fD8lrCAQfWW7iqoalZP6Ky1rB1uwMqCtHVBswFk2O35VHtqB3 WL/wdp8omjrs9YUeS/MFD5EPmSZ4A4JHhRZCN34FcBLXnRXFkd+LS0hxqRPaLHbzQjQz a+dNGPiZIQoCpUAKFB+qAzpRvA0o0+YZcGQ+QO5vrCcmrh2NDNC6ACZbPfEBoHZYxQUS QHYw== 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 o1-v6si13704566plb.459.2018.04.01.20.35.21; Sun, 01 Apr 2018 20:35:35 -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 S1754195AbeDBDeR (ORCPT + 99 others); Sun, 1 Apr 2018 23:34:17 -0400 Received: from zxshcas2.zhaoxin.com ([180.169.121.92]:22991 "EHLO ZXSHCAS2.zhaoxin.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754139AbeDBDeL (ORCPT ); Sun, 1 Apr 2018 23:34:11 -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; Mon, 2 Apr 2018 11:34:07 +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; Mon, 2 Apr 2018 11:34:06 +0800 From: David Wang To: , , , , , , , CC: , , , , , , David Wang Subject: [PATCH v2 1/2] x86/mce: new Centaur CPUs support MCE broadcasting Date: Mon, 2 Apr 2018 11:33:51 +0800 Message-ID: <1522640032-3357-2-git-send-email-davidwang@zhaoxin.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1522640032-3357-1-git-send-email-davidwang@zhaoxin.com> References: <1522640032-3357-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..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) 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