From patchwork Fri Apr 7 07:52:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9668959 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 09437602A0 for ; Fri, 7 Apr 2017 07:54:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC04D285AD for ; Fri, 7 Apr 2017 07:54:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFBDE285DC; Fri, 7 Apr 2017 07:54:41 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED 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 74E5E285AD for ; Fri, 7 Apr 2017 07:54:41 +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 1cwOhL-00049r-7h; Fri, 07 Apr 2017 07:52:47 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cwOhJ-00049T-EJ for xen-devel@lists.xen.org; Fri, 07 Apr 2017 07:52:45 +0000 Received: from [85.158.139.211] by server-10.bemta-5.messagelabs.com id 09/0E-02186-C4547E85; Fri, 07 Apr 2017 07:52:44 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpjkeJIrShJLcpLzFFi42Jpa+tI0fVxfR5 hsGk6t8WSj4tZHBg9ju7+zRTAGMWamZeUX5HAmjFv3i/mgvecFUse7mRsYDzB0cXIySEkUCmx 8PB7RhBbQoBX4siyGawQtr/Enavr2boYuYBqehkl5h54xAaSYBPQl1jx+CBYkYiAtMS1z5fBm pkFqiWmrTwHViMskC/xYtdasBoWAVWJb9OXMIPYvAK2Eu+X9UMtkJe4cPUUC4jNKWAncXDnJy aIg2wlpvUvYoaJ/2p8yDqBkW8BI8MqRo3i1KKy1CJdIwO9pKLM9IyS3MTMHF1DA1O93NTi4sT 01JzEpGK95PzcTYzAMKlnYGDcwdg42+8QoyQHk5Ior4LPkwghvqT8lMqMxOKM+KLSnNTiQ4wy HBxKErxzXJ5HCAkWpaanVqRl5gADFiYtwcGjJMJ7yBkozVtckJhbnJkOkTrFqMvx6Or790xCL Hn5ealS4rwhIDMEQIoySvPgRsCi5xKjrJQwLyMDA4MQT0FqUW5mCar8K0ZxDkYlYV4OkCk8mX klcJteAR3BBHSEz62nIEeUJCKkpBoYOWNP9fOZr2HYmiX+4tTX/ysmzLr1KkpvotPaH/vXG9t ylOerHD+y+itvU0dnA5vtIwm5YqFwgawpvncKPzKVxB/a7vjbufZiwi3dY+cW1LQEz7wv4CUc HZp6MW/Jipt2Nr1yF/fenW8huv3+VwGbffyrz6eeiTZtDU7dFuKft9nuHodXwMcvSizFGYmGW sxFxYkAboV2C5kCAAA= X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-7.tower-206.messagelabs.com!1491551560!89495494!1 X-Originating-IP: [134.134.136.100] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.12; banners=-,-,- X-VirusChecked: Checked Received: (qmail 63133 invoked from network); 7 Apr 2017 07:52:42 -0000 Received: from mga07.intel.com (HELO mga07.intel.com) (134.134.136.100) by server-7.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 7 Apr 2017 07:52:42 -0000 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP; 07 Apr 2017 00:52:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,164,1488873600"; d="scan'208";a="245734347" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.153]) by fmsmga004.fm.intel.com with ESMTP; 07 Apr 2017 00:52:39 -0700 From: Haozhong Zhang To: xen-devel@lists.xen.org Date: Fri, 7 Apr 2017 15:52:20 +0800 Message-Id: <20170407075220.26914-2-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170407075220.26914-1-haozhong.zhang@intel.com> References: <20170407075220.26914-1-haozhong.zhang@intel.com> In-Reply-To: <20170406123343.23423-5-haozhong.zhang@intel.com> Cc: Andrew Cooper , Jan Beulich , Haozhong Zhang Subject: [Xen-devel] [RESEND 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 Reviewed-by: Jan Beulich --- Reason for resend: * Adapt for resent patch 3. --- 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 0d9d5b0..54fd000 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; @@ -450,6 +447,8 @@ void mcheck_cmn_handler(const struct cpu_user_regs *regs) { static DEFINE_MCE_BARRIER(mce_trap_bar); static atomic_t severity_cpu = ATOMIC_INIT(-1); + 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;