[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 06/15] xen/cpufreq: disable px statistic info in amd-cppc mode
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Penny Zheng <Penny.Zheng@xxxxxxx>
- Date: Mon, 14 Apr 2025 15:40:47 +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=qwM1okoZi56E1zIpImVLgp1DbrCBg+nCr0izLGm2QqY=; b=NtyXBB9Dh1zfOjo1L5P51KarL/UWxeH92uUURBUuJe7XGM9c43LJ6hU73pzQNb8zYBt2NItaaf73DLdXqYiShdDpAQMxeJexqBweN5vkHdlb7BHGtpPY3h8gNv/KSqMIHbaXMAVPhJg5/AMfYmgbfw6BK5DiRkfVBXmIje1h2M7tEwppAfmprBr1E5vgd9nHmpHo7WXqiNshmp9rzpAE9FNjs24uW9tVWFA74Lt/27+xikjcz3BxYUkAg7mLRryk5SyLj+X4NuTdN5hVCVbLi79qCYAtGHpwnjdViE5yWEJMA3mlguPbpD3XjRdhkZ/4w8dp4HbzTf0K7psCzKjKig==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=HXXM7gonYPtLLX3r3eheWztwAk+YW1KYatB59mvJX0w9t4EauMFlpgb2XKuCcJMMLFScKSXqSL+f0SuOJmZqittYxq5IFUt4JEQbUukVbwgG8/WPRCcWi/1NWM0e0RZMsevKy+43vn+c6XB/iiHkj4RUjJDIFxh3u6jMSQLOGeTbD3fNBhWZbxMv+k9JH78ZA1VaG1ng1zaDQYT2XWnIGkgpH+0edO9sEygIeYe2ByTjXgQBuJNj/8Safhwy+WXZnJd0/iKL1V5KwfLD7zRJN0nrVhZJYFnrQTVInj4e53zzKm9eXucG6e10ZkFJ0hKbyXYXWc2XLDTCKxun6kp2Tg==
- Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Mon, 14 Apr 2025 07:41:40 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
We need to bypass construction of px statistic info in
cpufreq_statistic_init() for amd-cppc mode, as P-states is not necessary there.
Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v3 -> v4:
- remove unnecessary stub for cpufreq_statistic_exit()
---
xen/drivers/cpufreq/utility.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/xen/drivers/cpufreq/utility.c b/xen/drivers/cpufreq/utility.c
index e690a484f1..b35e2eb1b6 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);
--
2.34.1
|