From patchwork Tue Sep 5 09:32:34 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yi Sun X-Patchwork-Id: 9938347 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 2A36F603F9 for ; Tue, 5 Sep 2017 09:53:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1CE4C28902 for ; Tue, 5 Sep 2017 09:53:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 118ED2890C; Tue, 5 Sep 2017 09:53:57 +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 61D8C28908 for ; Tue, 5 Sep 2017 09:53:56 +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 1dpAWP-0007Tl-Eb; Tue, 05 Sep 2017 09:51:53 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dpAWO-0007SO-DG for xen-devel@lists.xenproject.org; Tue, 05 Sep 2017 09:51:52 +0000 Received: from [193.109.254.147] by server-4.bemta-6.messagelabs.com id 36/D0-03283-7B37EA95; Tue, 05 Sep 2017 09:51:51 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrMIsWRWlGSWpSXmKPExsXS1taRoru9eF2 kwcS93Bbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8bqD5fZC7YpVbQ/a2ZtYPwl2cXIySEkUCnx 8+ABdhBbQoBX4siyGawQtr/EmZX/gOJcQDUNjBLbJxxiAkmwCahLPP7aA2aLCChJ3Fs1mQmki FngHJPEno87wBLCAl4SR5b/AOrm4GARUJX4NyMSJMwr4CHxfeJFRogFchInj01mBSnhBIovvV YHcY+7xJ9td1khygUlTs58wgJSwgy0dv08IZAws4C8RPPW2cwTGAVmIamahVA1C0nVAkbmVYw axalFZalFuoaGeklFmekZJbmJmTm6hgZmermpxcWJ6ak5iUnFesn5uZsYgYHJAAQ7GD8tCzjE KMnBpCTKG5q4LlKILyk/pTIjsTgjvqg0J7X4EKMMB4eSBO+tIqCcYFFqempFWmYOMEZg0hIcP EoivOdA0rzFBYm5xZnpEKlTjIpS4rzHQRICIImM0jy4NlhcXmKUlRLmZQQ6RIinILUoN7MEVf 4VozgHo5Iw7xKQKTyZeSVw018BLWYCWlz1cg3I4pJEhJRUA+PaZv4bVlMzWyYql3xx7E+4963 whcXqr1faZgU/05p9mOPr8pPq2y1+nlRtnVt/KFfwGrOZ+e4G2yncR9f/W3DCr6JSLPX5xJPm XWLc8pPepy/09ugLebjs9R67k3ZG4hk3mLv4Nic/ssl3EFrx95CMS3LKsSxBRrtaxf9TEzRvd glOso7+OEmJpTgj0VCLuag4EQDdunn9xgIAAA== X-Env-Sender: yi.y.sun@linux.intel.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1504605073!62289035!9 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.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 50301 invoked from network); 5 Sep 2017 09:51:50 -0000 Received: from mga07.intel.com (HELO mga07.intel.com) (134.134.136.100) by server-15.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 5 Sep 2017 09:51:50 -0000 Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga105.jf.intel.com with ESMTP; 05 Sep 2017 02:51:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,479,1498546800"; d="scan'208";a="897185445" Received: from vmmmba-s2600wft.bj.intel.com ([10.240.193.80]) by FMSMGA003.fm.intel.com with ESMTP; 05 Sep 2017 02:51:45 -0700 From: Yi Sun To: xen-devel@lists.xenproject.org Date: Tue, 5 Sep 2017 17:32:34 +0800 Message-Id: <1504603957-5389-13-git-send-email-yi.y.sun@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1504603957-5389-1-git-send-email-yi.y.sun@linux.intel.com> References: <1504603957-5389-1-git-send-email-yi.y.sun@linux.intel.com> MIME-Version: 1.0 Cc: kevin.tian@intel.com, wei.liu2@citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, ian.jackson@eu.citrix.com, Yi Sun , julien.grall@arm.com, mengxu@cis.upenn.edu, jbeulich@suse.com, chao.p.peng@linux.intel.com, dgdegra@tycho.nsa.gov, roger.pau@citrix.com Subject: [Xen-devel] [PATCH v3 12/15] tools: rename 'xc_psr_cat_type' to 'xc_psr_type' 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: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This patch renames 'xc_psr_cat_type' to 'xc_psr_type' so that the structure name is common for all allocation features. Signed-off-by: Yi Sun Acked-by: Wei Liu Reviewed-by: Chao Peng --- v3: - change 'xc_psr_val_type' to 'xc_psr_type'. (suggested by Roger Pau Monné) --- tools/libxc/include/xenctrl.h | 8 ++++---- tools/libxc/xc_psr.c | 4 ++-- tools/libxl/libxl_psr.c | 12 ++++++------ 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index bbdf8e2..63b92d2 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -2450,13 +2450,13 @@ enum xc_psr_cmt_type { }; typedef enum xc_psr_cmt_type xc_psr_cmt_type; -enum xc_psr_cat_type { +enum xc_psr_type { XC_PSR_CAT_L3_CBM = 1, XC_PSR_CAT_L3_CBM_CODE = 2, XC_PSR_CAT_L3_CBM_DATA = 3, XC_PSR_CAT_L2_CBM = 4, }; -typedef enum xc_psr_cat_type xc_psr_cat_type; +typedef enum xc_psr_type xc_psr_type; enum xc_psr_feat_type { XC_PSR_FEAT_UNKNOWN, @@ -2499,10 +2499,10 @@ int xc_psr_cmt_get_data(xc_interface *xch, uint32_t rmid, uint32_t cpu, int xc_psr_cmt_enabled(xc_interface *xch); int xc_psr_cat_set_domain_data(xc_interface *xch, uint32_t domid, - xc_psr_cat_type type, uint32_t target, + xc_psr_type type, uint32_t target, uint64_t data); int xc_psr_cat_get_domain_data(xc_interface *xch, uint32_t domid, - xc_psr_cat_type type, uint32_t target, + xc_psr_type type, uint32_t target, uint64_t *data); int xc_psr_get_hw_info(xc_interface *xch, uint32_t socket, xc_psr_feat_type type, xc_psr_hw_info *hw_info); diff --git a/tools/libxc/xc_psr.c b/tools/libxc/xc_psr.c index a8a750a..80642a2 100644 --- a/tools/libxc/xc_psr.c +++ b/tools/libxc/xc_psr.c @@ -249,7 +249,7 @@ int xc_psr_cmt_enabled(xc_interface *xch) return 0; } int xc_psr_cat_set_domain_data(xc_interface *xch, uint32_t domid, - xc_psr_cat_type type, uint32_t target, + xc_psr_type type, uint32_t target, uint64_t data) { DECLARE_DOMCTL; @@ -284,7 +284,7 @@ int xc_psr_cat_set_domain_data(xc_interface *xch, uint32_t domid, } int xc_psr_cat_get_domain_data(xc_interface *xch, uint32_t domid, - xc_psr_cat_type type, uint32_t target, + xc_psr_type type, uint32_t target, uint64_t *data) { int rc; diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c index d534ec2..c8d2921 100644 --- a/tools/libxl/libxl_psr.c +++ b/tools/libxl/libxl_psr.c @@ -303,11 +303,11 @@ out: return rc; } -static inline xc_psr_cat_type libxl__psr_cbm_type_to_libxc_psr_cat_type( +static inline xc_psr_type libxl__psr_cbm_type_to_libxc_psr_type( libxl_psr_cbm_type type) { - BUILD_BUG_ON(sizeof(libxl_psr_cbm_type) != sizeof(xc_psr_cat_type)); - return (xc_psr_cat_type)type; + BUILD_BUG_ON(sizeof(libxl_psr_cbm_type) != sizeof(xc_psr_type)); + return (xc_psr_type)type; } int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, @@ -325,12 +325,12 @@ int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, } libxl_for_each_set_bit(socketid, *target_map) { - xc_psr_cat_type xc_type; + xc_psr_type xc_type; if (socketid >= nr_sockets) break; - xc_type = libxl__psr_cbm_type_to_libxc_psr_cat_type(type); + xc_type = libxl__psr_cbm_type_to_libxc_psr_type(type); if (xc_psr_cat_set_domain_data(ctx->xch, domid, xc_type, socketid, cbm)) { libxl__psr_cat_log_err_msg(gc, errno); @@ -349,7 +349,7 @@ int libxl_psr_cat_get_cbm(libxl_ctx *ctx, uint32_t domid, { GC_INIT(ctx); int rc = 0; - xc_psr_cat_type xc_type = libxl__psr_cbm_type_to_libxc_psr_cat_type(type); + xc_psr_type xc_type = libxl__psr_cbm_type_to_libxc_psr_type(type); if (xc_psr_cat_get_domain_data(ctx->xch, domid, xc_type, target, cbm_r)) {