From patchwork Tue Jan 10 07:42:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yi Sun X-Patchwork-Id: 9506641 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 E75ED606E1 for ; Tue, 10 Jan 2017 07:45:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB87D28485 for ; Tue, 10 Jan 2017 07:45:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFBC5284B0; Tue, 10 Jan 2017 07:45:51 +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 88F1028485 for ; Tue, 10 Jan 2017 07:45:51 +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 1cQr5y-00046Z-TX; Tue, 10 Jan 2017 07:43:50 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cQr5x-00044E-KW for xen-devel@lists.xenproject.org; Tue, 10 Jan 2017 07:43:49 +0000 Received: from [85.158.143.35] by server-1.bemta-6.messagelabs.com id 18/5E-27678-4B094785; Tue, 10 Jan 2017 07:43:48 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPLMWRWlGSWpSXmKPExsVywNykWHfLhJI Ig6VTRS2+b5nM5MDocfjDFZYAxijWzLyk/IoE1ow75zexFBwQrvjY2szWwNjC18XIySEkUCmx +8IPRhBbQoBX4siyGawQtr/E198bmbsYuYBqGhgluq+uZAdJsAmoSzz+2sMEYosIKEncWzWZC aSIWWA/o8T848eZQRLCAt4Sx+acZQGxWQRUJb79+Qg2lVfAQ2LW681Q2+QkTh6bDBbnBIq3XF 3HCHGRu0Tz2/uMExh5FzAyrGLUKE4tKkst0jU21ksqykzPKMlNzMzRNTQw08tNLS5OTE/NSUw q1kvOz93ECAwIBiDYwbhzfeAhRkkOJiVR3hTdkgghvqT8lMqMxOKM+KLSnNTiQ4wyHBxKErxf +4FygkWp6akVaZk5wNCESUtw8CiJ8LKApHmLCxJzizPTIVKnGBWlxHn3giQEQBIZpXlwbbB4u MQoKyXMywh0iBBPQWpRbmYJqvwrRnEORiVhXnaQKTyZeSVw018BLWYCWhxpVwyyuCQRISXVwF iqffXRzls3kiN3z7ucWjvf5eEz585v1yw/zDuzdNKbik0PvMV1Hcx/3LBY97F0ztEf/+J/Kea Vrfzy4qQ9X7vkcZfEjrfmjFPyIvf9ure0OSn0pOGyzUL8Wn3nbXecfHRZwuzQlBOqu9OVPL3K Pe3Z8j+xCE3tD3ESmPjhySPFkm13tsoGJNYpsRRnJBpqMRcVJwIAkWo/NIICAAA= X-Env-Sender: yi.y.sun@linux.intel.com X-Msg-Ref: server-11.tower-21.messagelabs.com!1484034222!51795053!4 X-Originating-IP: [192.55.52.115] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.1.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15533 invoked from network); 10 Jan 2017 07:43:48 -0000 Received: from mga14.intel.com (HELO mga14.intel.com) (192.55.52.115) by server-11.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 10 Jan 2017 07:43:48 -0000 Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga103.fm.intel.com with ESMTP; 09 Jan 2017 23:43:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,343,1477983600"; d="scan'208";a="211583237" Received: from vmmmba-s2600wft.bj.intel.com ([10.240.193.63]) by fmsmga004.fm.intel.com with ESMTP; 09 Jan 2017 23:43:45 -0800 From: Yi Sun To: xen-devel@lists.xenproject.org Date: Tue, 10 Jan 2017 15:42:31 +0800 Message-Id: <1484034155-4521-13-git-send-email-yi.y.sun@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484034155-4521-1-git-send-email-yi.y.sun@linux.intel.com> References: <1484034155-4521-1-git-send-email-yi.y.sun@linux.intel.com> Cc: wei.liu2@citrix.com, he.chen@linux.intel.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, Yi Sun , jbeulich@suse.com, chao.p.peng@linux.intel.com Subject: [Xen-devel] [RFC 12/16] tools: refactor codes to make set val be more general. 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 This patch refactors some codes in tools/ to make set value be more general. Signed-off-by: Yi Sun --- tools/libxc/include/xenctrl.h | 6 +++--- tools/libxc/xc_psr.c | 6 +++--- tools/libxl/libxl_psr.c | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 69f9343..9233b86 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -2639,9 +2639,9 @@ int xc_psr_cmt_get_data(xc_interface *xch, uint32_t rmid, uint32_t cpu, uint64_t *tsc); int xc_psr_cmt_enabled(xc_interface *xch); -int xc_psr_cat_set_domain_data(xc_interface *xch, uint32_t domid, - xc_psr_val_type type, uint32_t target, - uint64_t data); +int xc_psr_set_domain_data(xc_interface *xch, uint32_t domid, + xc_psr_val_type type, uint32_t target, + uint64_t data); int xc_psr_get_domain_data(xc_interface *xch, uint32_t domid, xc_psr_val_type type, uint32_t target, uint64_t *data); diff --git a/tools/libxc/xc_psr.c b/tools/libxc/xc_psr.c index 4dbb7c6..a7ffb1b 100644 --- a/tools/libxc/xc_psr.c +++ b/tools/libxc/xc_psr.c @@ -248,9 +248,9 @@ 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_val_type type, uint32_t target, - uint64_t data) +int xc_psr_set_domain_data(xc_interface *xch, uint32_t domid, + xc_psr_val_type type, uint32_t target, + uint64_t data) { DECLARE_DOMCTL; uint32_t cmd; diff --git a/tools/libxl/libxl_psr.c b/tools/libxl/libxl_psr.c index 07c4bc4..1245e1e 100644 --- a/tools/libxl/libxl_psr.c +++ b/tools/libxl/libxl_psr.c @@ -372,8 +372,8 @@ int libxl_psr_cat_set_cbm(libxl_ctx *ctx, uint32_t domid, break; xc_type = libxl__psr_cbm_type_to_libxc_psr_val_type(type); - if (xc_psr_cat_set_domain_data(ctx->xch, domid, xc_type, - socketid, cbm)) { + if (xc_psr_set_domain_data(ctx->xch, domid, xc_type, + socketid, cbm)) { libxl__psr_alloc_log_err_msg(gc, type, errno); rc = ERROR_FAIL; }