From patchwork Thu Apr 6 12:33:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9667079 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 9087A601EB for ; Thu, 6 Apr 2017 12:36:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A6CB28535 for ; Thu, 6 Apr 2017 12:36:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6CA252858A; Thu, 6 Apr 2017 12:36:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E92A628535 for ; Thu, 6 Apr 2017 12:36:02 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw6bx-0007jB-Tj; Thu, 06 Apr 2017 12:34:01 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cw6bx-0007ij-A9 for xen-devel@lists.xen.org; Thu, 06 Apr 2017 12:34:01 +0000 Received: from [193.109.254.147] by server-7.bemta-6.messagelabs.com id B8/4E-04817-8B536E85; Thu, 06 Apr 2017 12:34:00 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpnkeJIrShJLcpLzFFi42Jpa+sQ0d1h+iz CoH0/t8WSj4tZHBg9ju7+zRTAGMWamZeUX5HAmnF82UzGgjucFS+mTGJvYNzL0cXIxcEicItJ YvmEo6wgjpDAdEaJzXea2boYOTkkBHgljiybAZTgALIDJH49t4Oo6WWU2LtpJStIDZuAvsSKx wfBbBEBaYlrny8zgtjMAtUS01aeA5sjLJAhMfnlNBYQm0VAVaJ7yV+wOK+ArcSSnklQu+QlLl w9BVbDKWAncaT/L5gtBFSzsvMfywRGvgWMDKsYNYpTi8pSi3SNDfWSijLTM0pyEzNzdA0NzPR yU4uLE9NTcxKTivWS83M3MQIDhQEIdjA2LQo8xCjJwaQkyqvg8yRCiC8pP6UyI7E4I76oNCe1 +BCjDAeHkgRvncmzCCHBotT01Iq0zBxgyMKkJTh4lER4G0HSvMUFibnFmekQqVOMuhyPrr5/z yTEkpeflyolznsSpEgApCijNA9uBCx+LjHKSgnzMgIdJcRTkFqUm1mCKv+KUZyDUUmY1wdkCk 9mXgncpldARzABHeFz6ynIESWJCCmpBsZNl8J/eG5OZL9ifX761tz8ab95uQ8f1u56pK7ifjZ u/aO2tzkdftcnmnabH3La7tJXlbvSzk/hakGQweZczT2r5cpzUnmDD4hv2/3JsiByjuim4sWx JjsY8r4a2LbLXzF5Jty8ft8sp8+/vxpVy4Zfv6yn+kLgqe6Cydfap83WrZbSiTPl5FViKc5IN NRiLipOBABwHrrHmgIAAA== X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1491482036!43572272!2 X-Originating-IP: [134.134.136.20] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTM0LjEzNC4xMzYuMjAgPT4gMzU1MzU4\n X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 30144 invoked from network); 6 Apr 2017 12:33:59 -0000 Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by server-2.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 6 Apr 2017 12:33:59 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1491482039; x=1523018039; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=sVPWH8gviAf5gEPfT5KxBgJ0qimt9QEowkMi3XMDk3Q=; b=Z3qIZuRHAh5NN17M6H4u+BszzPlnVjSYAAcXk2mG7f7kAZzSyIycQayR kg8znA1fpdZ9bGXgslCHKETJ3ef4tQ==; Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Apr 2017 05:33:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos; i="5.37,159,1488873600"; d="scan'208"; a="1151979817" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.153]) by fmsmga002.fm.intel.com with ESMTP; 06 Apr 2017 05:33:56 -0700 From: Haozhong Zhang To: xen-devel@lists.xen.org Date: Thu, 6 Apr 2017 20:33:43 +0800 Message-Id: <20170406123343.23423-5-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170406123343.23423-1-haozhong.zhang@intel.com> References: <20170406123343.23423-1-haozhong.zhang@intel.com> Cc: Andrew Cooper , Jan Beulich , Haozhong Zhang Subject: [Xen-devel] [PATCH v2 4/4] xen/mce: make 'found_error' and 'mce_fatal_cpus' private to mcheck_cmn_handler() X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP mcheck_cmn_handler() is the only user of 'found_error' and 'mce_fatal_cpus'. Signed-off-by: Haozhong Zhang --- xen/arch/x86/cpu/mcheck/mce.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c index d1bc642..39d19a3 100644 --- a/xen/arch/x86/cpu/mcheck/mce.c +++ b/xen/arch/x86/cpu/mcheck/mce.c @@ -182,9 +182,6 @@ void mce_need_clearbank_register(mce_need_clearbank_t cbfunc) */ static DEFINE_SPINLOCK(mce_logout_lock); -static atomic_t found_error = ATOMIC_INIT(0); -static cpumask_t mce_fatal_cpus; - const struct mca_error_handler *__read_mostly mce_dhandlers; const struct mca_error_handler *__read_mostly mce_uhandlers; unsigned int __read_mostly mce_dhandler_num; @@ -451,6 +448,8 @@ void mcheck_cmn_handler(const struct cpu_user_regs *regs) static DEFINE_MCE_BARRIER(mce_trap_bar); static DEFINE_MCE_BARRIER(mce_handler_init_bar); static atomic_t severity_cpu; + static atomic_t found_error = ATOMIC_INIT(0); + static cpumask_t mce_fatal_cpus; struct mca_banks *bankmask = mca_allbanks; struct mca_banks *clear_bank = __get_cpu_var(mce_clear_banks); uint64_t gstatus;