From patchwork Fri Feb 24 10:52:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haozhong Zhang X-Patchwork-Id: 9589903 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 AA36260471 for ; Fri, 24 Feb 2017 10:55:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E3CE2894F for ; Fri, 24 Feb 2017 10:55:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 832FD28952; Fri, 24 Feb 2017 10:55:47 +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 236162894F for ; Fri, 24 Feb 2017 10:55:47 +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 1chDVM-0003t0-Iu; Fri, 24 Feb 2017 10:53:40 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1chDVL-0003sC-KD for xen-devel@lists.xen.org; Fri, 24 Feb 2017 10:53:39 +0000 Received: from [85.158.137.68] by server-17.bemta-3.messagelabs.com id 5E/6C-04270-2B010B85; Fri, 24 Feb 2017 10:53:38 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPLMWRWlGSWpSXmKPExsXS1tYhortJYEO EQcsWOYslHxezODB6HN39mymAMYo1My8pvyKBNePFzU/sBY0iFY9/rmdpYPws0MXIxSEkMI1R ou34NrYuRk4OCQFeiSPLZrBC2P4Svw6fYQKxhQR6GSUWbTEDsdkE9CVWPD4IViMiIC1x7fNlR pBBzAILGSV2/moHSwgL2Ej8vbWUEcRmEVCVmHtsB9ggXgFbib7274wQC+QlLlw9xQJicwrYSV w8uJoRYpmtxLruB8wTGHkXMDKsYtQoTi0qSy3SNTLRSyrKTM8oyU3MzNE1NDDWy00tLk5MT81 JTCrWS87P3cQIDIh6BgbGHYyvjvsdYpTkYFIS5f3/cH2EEF9SfkplRmJxRnxRaU5q8SFGGQ4O JQneaP4NEUKCRanpqRVpmTnA0IRJS3DwKInwvgNJ8xYXJOYWZ6ZDpE4xKkqJ8wqCJARAEhmle XBtsHi4xCgrJczLyMDAIMRTkFqUm1mCKv+KUZyDUUmYtxJkCk9mXgnc9FdAi5mAFls6rwVZXJ KIkJJqYGwty/3Cofr+uNijZVuKi49a8gS/5WTgUz+VqPvuyZ0VPhvfhYf/KGOxeqqUtCKg/tX Zwkkxxvy/mu+ZRh5iSJzo5G/LtVW9zvREYJ1MYqHzk/vWLDcnbK3rO7/SR8BJ+MB9o9hVcdmC T/N09DJb7wjsfrZCsPSK7urplxuCos5/ij+9s3PDZSWW4oxEQy3mouJEABEQ2+KCAgAA X-Env-Sender: haozhong.zhang@intel.com X-Msg-Ref: server-10.tower-31.messagelabs.com!1487933615!86569883!1 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.2.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5073 invoked from network); 24 Feb 2017 10:53:37 -0000 Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by server-10.tower-31.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 24 Feb 2017 10:53:37 -0000 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Feb 2017 02:53:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,200,1484035200"; d="scan'208";a="937650280" Received: from hz-desktop.sh.intel.com (HELO localhost) ([10.239.159.133]) by orsmga003.jf.intel.com with ESMTP; 24 Feb 2017 02:53:33 -0800 From: Haozhong Zhang To: xen-devel@lists.xen.org Date: Fri, 24 Feb 2017 18:52:51 +0800 Message-Id: <20170224105256.24668-3-haozhong.zhang@intel.com> X-Mailer: git-send-email 2.10.1 In-Reply-To: <20170224105256.24668-1-haozhong.zhang@intel.com> References: <20170224105256.24668-1-haozhong.zhang@intel.com> Cc: Haozhong Zhang , Christoph Egger , Jan Beulich , Andrew Cooper Subject: [Xen-devel] [PATCH 2/7] xen/mce: remove unused x86_mcinfo_add() 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 c/s 9d13fd9fd320a7740c6446c048ff6a2990095966 turned to update the mcinfo buffer in-place instead of using x86_mcinfo_add(). The last uses of x86_mcinfo_add() were removed by that commit as well. Therefore, x86_mcinfo_add() was deprecated in fact. Signed-off-by: Haozhong Zhang Reviewed-by: Jan Beulich --- Cc: Christoph Egger Cc: Jan Beulich Cc: Andrew Cooper Changes: * Explain the reason in the commit message. * Update the code comment mentioning x86_mcinfo_add. --- xen/arch/x86/cpu/mcheck/mce.c | 16 ---------------- xen/arch/x86/cpu/mcheck/mce.h | 3 +-- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/xen/arch/x86/cpu/mcheck/mce.c b/xen/arch/x86/cpu/mcheck/mce.c index e41989d..aa9304f 100644 --- a/xen/arch/x86/cpu/mcheck/mce.c +++ b/xen/arch/x86/cpu/mcheck/mce.c @@ -835,22 +835,6 @@ void *x86_mcinfo_reserve(struct mc_info *mi, int size) return memset(mic_index, 0, size); } -void *x86_mcinfo_add(struct mc_info *mi, void *mcinfo) -{ - struct mcinfo_common *mic, *buf; - - mic = (struct mcinfo_common *)mcinfo; - buf = x86_mcinfo_reserve(mi, mic->size); - - if ( !buf ) - mce_printk(MCE_CRITICAL, - "mcinfo_add: No space left in mc_info\n"); - else - memcpy(buf, mic, mic->size); - - return buf; -} - static void x86_mcinfo_apei_save( struct mcinfo_global *mc_global, struct mcinfo_bank *mc_bank) { diff --git a/xen/arch/x86/cpu/mcheck/mce.h b/xen/arch/x86/cpu/mcheck/mce.h index 42bb782..a28e862 100644 --- a/xen/arch/x86/cpu/mcheck/mce.h +++ b/xen/arch/x86/cpu/mcheck/mce.h @@ -142,7 +142,7 @@ extern void mce_need_clearbank_register(mce_need_clearbank_t); * architectural) provided by newer CPU families/models without the need * to duplicate the whole handler resulting in various handlers each with * its own tweaks and bugs. The callback receives an struct mc_info pointer - * which it can use with x86_mcinfo_add to add additional telemetry, + * which it can use with x86_mcinfo_reserve to add additional telemetry, * the current MCA bank number we are reading telemetry from, and the * MCi_STATUS value for that bank. */ @@ -150,7 +150,6 @@ typedef struct mcinfo_extended *(*x86_mce_callback_t) (struct mc_info *, uint16_t, uint64_t); extern void x86_mce_callback_register(x86_mce_callback_t); -void *x86_mcinfo_add(struct mc_info *mi, void *mcinfo); void *x86_mcinfo_reserve(struct mc_info *mi, int size); void x86_mcinfo_dump(struct mc_info *mi);