[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 06/15] xen/cpufreq: disable px statistic info in amd-cppc mode
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Penny Zheng <Penny.Zheng@xxxxxxx>
- Date: Thu, 6 Mar 2025 16:39:40 +0800
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i6iDSLQoooiR5gm7higEaAq42NXQT6TzllxZUAXS+Vw=; b=YIBxtLaB23F+Vo+H5jza+Td797DaQ0bF7LLE2xi9fQquv1FUIuiYPlC4awUKxYMZSB2aXNrRNwVWlErNPLg+Ho1dhHmC5+j4NJMAy95TfEMkS9xteD7WKWnA9D8J/Upp+WiNGPoWQzj3AbFcsV6gtxlbAfB993vJsBwJQ9AewernThzrHgpRXIuSWjPBausrgMxho+hu6LJRIi/3spZgIndgzgNdrvlqEIVn4TI9ZJclVu3Y9E9tbjAlTE9kZpVihltqtEqsZr03rqa2zFADgb36uf+apBNr65I7ks+ZfJXXIfT9th9/zlRMtFr1TicrWvsvLVjCErmcdshgen1TIg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=gAu+8fASJam+A4Dv5UyxArKvfBDgkxo/o3EFJHNSwMrqaLJLyNNl2EG4VzfusvU4XWmIzo7jLPRMvhLcy2OA38oMid+1Yjz/nHCgHjcgsbTH+Kt4VTBPSHWAbwRJpYGl7Si9Rzblqjk0cXxErGV25eCQ88KgaCossV4C3cTEI0kdnSvpt7ulHQY5m2AfXVaY6aUSUG82NUcWlx6orLH8hhSNJmMoP4ylRa94zpGaDLujV/fyltnqdbt9Sr52NAWKZ+E5lhyJEXm6eWirjOJVZvSoe9cpXcCOIE7TzUXkkxBVOS+uz1efy7TSh1EQ2e/V6/rzpM83f1znOHKIuvIXYg==
- Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Thu, 06 Mar 2025 08:40:42 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Bypass cnstruction and deconstruction for px statistic info(
cpufreq_statistic_init and cpufreq_statistic_exit) in cpufreq
CPPC mode.
Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v2 -> v3:
- new commit
---
xen/drivers/cpufreq/utility.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/xen/drivers/cpufreq/utility.c b/xen/drivers/cpufreq/utility.c
index e690a484f1..f1fd2fdbce 100644
--- a/xen/drivers/cpufreq/utility.c
+++ b/xen/drivers/cpufreq/utility.c
@@ -98,6 +98,9 @@ int cpufreq_statistic_init(unsigned int cpu)
if ( !pmpt )
return -EINVAL;
+ if ( !(pmpt->init & XEN_PX_INIT) )
+ return 0;
+
spin_lock(cpufreq_statistic_lock);
pxpt = per_cpu(cpufreq_statistic_data, cpu);
@@ -147,8 +150,12 @@ int cpufreq_statistic_init(unsigned int cpu)
void cpufreq_statistic_exit(unsigned int cpu)
{
struct pm_px *pxpt;
+ const struct processor_pminfo *pmpt = processor_pminfo[cpu];
spinlock_t *cpufreq_statistic_lock = &per_cpu(cpufreq_statistic_lock, cpu);
+ if ( !(pmpt->init & XEN_PX_INIT) )
+ return;
+
spin_lock(cpufreq_statistic_lock);
pxpt = per_cpu(cpufreq_statistic_data, cpu);
--
2.34.1
|