From patchwork Mon Sep 4 03:08:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Yi Sun X-Patchwork-Id: 9936683 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 338666035F for ; Mon, 4 Sep 2017 03:29:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 22A7A286C1 for ; Mon, 4 Sep 2017 03:29:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16259286C4; Mon, 4 Sep 2017 03:29:54 +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 482DD286C1 for ; Mon, 4 Sep 2017 03:29:53 +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 1doi2T-0004WT-3K; Mon, 04 Sep 2017 03:27:05 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1doi2S-0004WK-0o for xen-devel@lists.xenproject.org; Mon, 04 Sep 2017 03:27:04 +0000 Received: from [85.158.143.35] by server-10.bemta-6.messagelabs.com id B4/57-03642-708CCA95; Mon, 04 Sep 2017 03:27:03 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrAIsWRWlGSWpSXmKPExsXS1tYhost2Yk2 kwaLbShbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8aCo+/YCy6oVOw9c4W1gfGcTBcjF4eQwDRG iRPNs1m7GDk5JAR4JY4smwFl+0tM6JjKDlHUwChxZ9seZpAEm4C6xOOvPUwgtoiAksS9VZPBb GaBPIlFbZ9YQGxhAQuJtzt/gQ1iEVCVODjvFFicV8BD4tatlWwQC+QkTh6bDFTDwcEJFN+4Kg gkLCTgLvFv9W92iHJBiZMzn7CAlDADrV0/Twhik7xE89bZzBMYBWYhqZqFUDULSdUCRuZVjBr FqUVlqUW6hgZ6SUWZ6RkluYmZOUCemV5uanFxYnpqTmJSsV5yfu4mRmBoMgDBDsbj7+MOMUpy MCmJ8i7zWBUpxJeUn1KZkVicEV9UmpNafIhRhoNDSYI39tiaSCHBotT01Iq0zBxglMCkJTh4l ER4G0HSvMUFibnFmekQqVOMuhwbVq//wiTEkpeflyolzmsDUiQAUpRRmgc3AhaxlxhlpYR5GY GOEuIpSC3KzSxBlX/FKM7BqCTMGwAyhSczrwRu0yugI5iAjvj3eQXIESWJCCmpBkadt5uWlMS Gh097KMv5psVWl9m68e3iuMtF6l/aPZlnPD1n/ebf5sN3tS3Pfl+sERWvGaz4vnjSqn4n4Yln P6vuZDCUYlv+8PCV5NJ/YrYeB2VnHCsRbahebsx/sY/Lfr3zf53Q41928T3cPCNdfaXNsROvy 5Y+2v3CYvPR0v70IMkr3xRTnzkpsRRnJBpqMRcVJwIAjhCkmdMCAAA= X-Env-Sender: yi.y.sun@linux.intel.com X-Msg-Ref: server-5.tower-21.messagelabs.com!1504495620!72920267!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.4.45; banners=-,-,- X-VirusChecked: Checked Received: (qmail 33186 invoked from network); 4 Sep 2017 03:27:02 -0000 Received: from mga02.intel.com (HELO mga02.intel.com) (134.134.136.20) by server-5.tower-21.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 4 Sep 2017 03:27:02 -0000 Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2017 20:27:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,473,1498546800"; d="scan'208";a="145140440" Received: from vmmmba-s2600wft.bj.intel.com ([10.240.193.80]) by orsmga005.jf.intel.com with ESMTP; 03 Sep 2017 20:26:58 -0700 From: Yi Sun To: xen-devel@lists.xenproject.org Date: Mon, 4 Sep 2017 11:08:56 +0800 Message-Id: <1504494536-52985-1-git-send-email-yi.y.sun@linux.intel.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1504166886-3912-1-git-send-email-yi.y.sun@linux.intel.com> References: <1504166886-3912-1-git-send-email-yi.y.sun@linux.intel.com> MIME-Version: 1.0 Cc: wei.liu2@citrix.com, ian.jackson@eu.citrix.com, Yi Sun , roger.pau@citrix.com Subject: [Xen-devel] [PATCH v2] tools: remove unnecessary PSR macros 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 The libxl interfaces and related functions are not necessary to be included by 'LIBXL_HAVE_PSR_CMT' and 'LIBXL_HAVE_PSR_CAT'. So remove them. Suggested-by: Roger Pau Monné Signed-off-by: Yi Sun --- v2: - remove the macros in xl.h. --- tools/libxl/libxl.h | 6 ------ tools/xl/xl.h | 4 ---- tools/xl/xl_cmdtable.c | 5 ----- tools/xl/xl_psr.c | 5 ----- 4 files changed, 20 deletions(-) diff --git a/tools/libxl/libxl.h b/tools/libxl/libxl.h index 229e289..a0185b9 100644 --- a/tools/libxl/libxl.h +++ b/tools/libxl/libxl.h @@ -2166,7 +2166,6 @@ bool libxl_ms_vm_genid_is_zero(const libxl_ms_vm_genid *id); void libxl_ms_vm_genid_copy(libxl_ctx *ctx, libxl_ms_vm_genid *dst, const libxl_ms_vm_genid *src); -#ifdef LIBXL_HAVE_PSR_CMT int libxl_psr_cmt_attach(libxl_ctx *ctx, uint32_t domid); int libxl_psr_cmt_detach(libxl_ctx *ctx, uint32_t domid); int libxl_psr_cmt_domain_attached(libxl_ctx *ctx, uint32_t domid); @@ -2179,9 +2178,7 @@ int libxl_psr_cmt_get_cache_occupancy(libxl_ctx *ctx, uint32_t domid, uint32_t socketid, uint32_t *l3_cache_occupancy); -#endif -#ifdef LIBXL_HAVE_PSR_MBM int libxl_psr_cmt_type_supported(libxl_ctx *ctx, libxl_psr_cmt_type type); int libxl_psr_cmt_get_sample(libxl_ctx *ctx, uint32_t domid, @@ -2189,9 +2186,7 @@ int libxl_psr_cmt_get_sample(libxl_ctx *ctx, uint64_t scope, uint64_t *sample_r, uint64_t *tsc_r); -#endif -#ifdef LIBXL_HAVE_PSR_CAT /* * Function to set a domain's cbm. It operates on a single or multiple * target(s) defined in 'target_map'. The definition of 'target_map' is @@ -2219,7 +2214,6 @@ int libxl_psr_cat_get_info(libxl_ctx *ctx, libxl_psr_cat_info **info, int libxl_psr_cat_get_l3_info(libxl_ctx *ctx, libxl_psr_cat_info **info, int *nr); void libxl_psr_cat_info_list_free(libxl_psr_cat_info *list, int nr); -#endif /* misc */ diff --git a/tools/xl/xl.h b/tools/xl/xl.h index aa95b77..67d6f37 100644 --- a/tools/xl/xl.h +++ b/tools/xl/xl.h @@ -197,16 +197,12 @@ int main_loadpolicy(int argc, char **argv); int main_remus(int argc, char **argv); #endif int main_devd(int argc, char **argv); -#ifdef LIBXL_HAVE_PSR_CMT int main_psr_hwinfo(int argc, char **argv); int main_psr_cmt_attach(int argc, char **argv); int main_psr_cmt_detach(int argc, char **argv); int main_psr_cmt_show(int argc, char **argv); -#endif -#ifdef LIBXL_HAVE_PSR_CAT int main_psr_cat_cbm_set(int argc, char **argv); int main_psr_cat_show(int argc, char **argv); -#endif int main_qemu_monitor_command(int argc, char **argv); void help(const char *command); diff --git a/tools/xl/xl_cmdtable.c b/tools/xl/xl_cmdtable.c index 2c71a9f..045f640 100644 --- a/tools/xl/xl_cmdtable.c +++ b/tools/xl/xl_cmdtable.c @@ -517,7 +517,6 @@ struct cmd_spec cmd_table[] = { "-F Run in the foreground.\n" "-p, --pidfile [FILE] Write PID to pidfile when daemonizing.", }, -#ifdef LIBXL_HAVE_PSR_CMT { "psr-hwinfo", &main_psr_hwinfo, 0, 1, "Show hardware information for Platform Shared Resource", @@ -544,8 +543,6 @@ struct cmd_spec cmd_table[] = { "\"total-mem-bandwidth\": Show total memory bandwidth(KB/s)\n" "\"local-mem-bandwidth\": Show local memory bandwidth(KB/s)\n", }, -#endif -#ifdef LIBXL_HAVE_PSR_CAT { "psr-cat-set", &main_psr_cat_cbm_set, 0, 1, "Set cache capacity bitmasks(CBM) for a domain", @@ -561,8 +558,6 @@ struct cmd_spec cmd_table[] = { "[options] ", "-l Specify the cache level to process, otherwise L3 cache is processed\n" }, - -#endif { "usbctrl-attach", &main_usbctrl_attach, 0, 1, "Create a virtual USB controller for a domain", diff --git a/tools/xl/xl_psr.c b/tools/xl/xl_psr.c index 7309d4f..544f6f0 100644 --- a/tools/xl/xl_psr.c +++ b/tools/xl/xl_psr.c @@ -25,7 +25,6 @@ #include "xl_utils.h" #include "xl_parse.h" -#ifdef LIBXL_HAVE_PSR_CMT static int psr_cmt_hwinfo(void) { int rc; @@ -292,9 +291,7 @@ int main_psr_cmt_show(int argc, char **argv) return ret; } -#endif -#if defined(LIBXL_HAVE_PSR_CAT) || defined(LIBXL_HAVE_PSR_L2_CAT) static int psr_l3_cat_hwinfo(void) { int rc, nr; @@ -626,8 +623,6 @@ int main_psr_hwinfo(int argc, char **argv) return ret; } -#endif - /* * Local variables: * mode: C