From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 27DAFA0548; Fri, 23 Apr 2021 13:03:26 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0CA984014F; Fri, 23 Apr 2021 13:03:26 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 567064014F for ; Fri, 23 Apr 2021 13:03:24 +0200 (CEST) IronPort-SDR: G/w6WZ0TflDe3qkzvQ45I4q4oOEblMr3Fx1qJQJ7eMvipikks3Qc5Uc5FoRZAtXDEL+1NFgEmr b8/gnl5/QUDQ== X-IronPort-AV: E=McAfee;i="6200,9189,9962"; a="183531977" X-IronPort-AV: E=Sophos;i="5.82,245,1613462400"; d="scan'208";a="183531977" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Apr 2021 04:03:22 -0700 IronPort-SDR: vjbAsqRyfa201NIhv365MeRannp1Lg90Mn/2is/PFKhZs87G8PHg7vFRJd81MHzRD7sayt9HRj iLFEmgAxF73Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,245,1613462400"; d="scan'208";a="617949806" Received: from silpixa00399498.ir.intel.com (HELO silpixa00399498.ger.corp.intel.com) ([10.237.223.216]) by fmsmga005.fm.intel.com with ESMTP; 23 Apr 2021 04:03:20 -0700 From: Anatoly Burakov To: dev@dpdk.org Cc: stephen@networkplumber.org, Richael.Zhuang@arm.com, reshma.pattan@intel.com, david.hunt@intel.com Date: Fri, 23 Apr 2021 11:03:18 +0000 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: <2fae7084c99dc8223e8d3a0aa9c2e5ba18bf1e6b.1619104102.git.anatoly.burakov@intel.com> References: <2fae7084c99dc8223e8d3a0aa9c2e5ba18bf1e6b.1619104102.git.anatoly.burakov@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [21.08 PATCH v4 1/2] power: don't use rte prefix in internal code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Currently, ACPI code uses rte_power_info as the struct name, which gives the appearance that this is an externally visible API. Fix to use internal namespace. Signed-off-by: Anatoly Burakov --- lib/power/power_acpi_cpufreq.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/lib/power/power_acpi_cpufreq.c b/lib/power/power_acpi_cpufreq.c index d028a9947f..1b8c69cc8b 100644 --- a/lib/power/power_acpi_cpufreq.c +++ b/lib/power/power_acpi_cpufreq.c @@ -78,7 +78,7 @@ enum power_state { /** * Power info per lcore. */ -struct rte_power_info { +struct acpi_power_info { unsigned int lcore_id; /**< Logical core id */ uint32_t freqs[RTE_MAX_LCORE_FREQS]; /**< Frequency array */ uint32_t nb_freqs; /**< number of available freqs */ @@ -90,14 +90,14 @@ struct rte_power_info { uint16_t turbo_enable; /**< Turbo Boost enable/disable */ } __rte_cache_aligned; -static struct rte_power_info lcore_power_info[RTE_MAX_LCORE]; +static struct acpi_power_info lcore_power_info[RTE_MAX_LCORE]; /** * It is to set specific freq for specific logical core, according to the index * of supported frequencies. */ static int -set_freq_internal(struct rte_power_info *pi, uint32_t idx) +set_freq_internal(struct acpi_power_info *pi, uint32_t idx) { if (idx >= RTE_MAX_LCORE_FREQS || idx >= pi->nb_freqs) { RTE_LOG(ERR, POWER, "Invalid frequency index %u, which " @@ -133,7 +133,7 @@ set_freq_internal(struct rte_power_info *pi, uint32_t idx) * governor will be saved for rolling back. */ static int -power_set_governor_userspace(struct rte_power_info *pi) +power_set_governor_userspace(struct acpi_power_info *pi) { FILE *f; int ret = -1; @@ -189,7 +189,7 @@ power_set_governor_userspace(struct rte_power_info *pi) * sys file. */ static int -power_get_available_freqs(struct rte_power_info *pi) +power_get_available_freqs(struct acpi_power_info *pi) { FILE *f; int ret = -1, i, count; @@ -259,7 +259,7 @@ power_get_available_freqs(struct rte_power_info *pi) * It is to fopen the sys file for the future setting the lcore frequency. */ static int -power_init_for_setting_freq(struct rte_power_info *pi) +power_init_for_setting_freq(struct acpi_power_info *pi) { FILE *f; char fullpath[PATH_MAX]; @@ -299,7 +299,7 @@ power_acpi_cpufreq_check_supported(void) int power_acpi_cpufreq_init(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; uint32_t exp_state; if (lcore_id >= RTE_MAX_LCORE) { @@ -374,7 +374,7 @@ power_acpi_cpufreq_init(unsigned int lcore_id) * needed by writing the sys file. */ static int -power_set_governor_original(struct rte_power_info *pi) +power_set_governor_original(struct acpi_power_info *pi) { FILE *f; int ret = -1; @@ -420,7 +420,7 @@ power_set_governor_original(struct rte_power_info *pi) int power_acpi_cpufreq_exit(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; uint32_t exp_state; if (lcore_id >= RTE_MAX_LCORE) { @@ -475,7 +475,7 @@ power_acpi_cpufreq_exit(unsigned int lcore_id) uint32_t power_acpi_cpufreq_freqs(unsigned int lcore_id, uint32_t *freqs, uint32_t num) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -522,7 +522,7 @@ power_acpi_cpufreq_set_freq(unsigned int lcore_id, uint32_t index) int power_acpi_cpufreq_freq_down(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -540,7 +540,7 @@ power_acpi_cpufreq_freq_down(unsigned int lcore_id) int power_acpi_cpufreq_freq_up(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -581,7 +581,7 @@ power_acpi_cpufreq_freq_max(unsigned int lcore_id) int power_acpi_cpufreq_freq_min(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -598,7 +598,7 @@ power_acpi_cpufreq_freq_min(unsigned int lcore_id) int power_acpi_turbo_status(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -614,7 +614,7 @@ power_acpi_turbo_status(unsigned int lcore_id) int power_acpi_enable_turbo(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -647,7 +647,7 @@ power_acpi_enable_turbo(unsigned int lcore_id) int power_acpi_disable_turbo(unsigned int lcore_id) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); @@ -674,7 +674,7 @@ power_acpi_disable_turbo(unsigned int lcore_id) int power_acpi_get_capabilities(unsigned int lcore_id, struct rte_power_core_capabilities *caps) { - struct rte_power_info *pi; + struct acpi_power_info *pi; if (lcore_id >= RTE_MAX_LCORE) { RTE_LOG(ERR, POWER, "Invalid lcore ID\n"); -- 2.25.1