[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 13/18] xen/cpufreq: normalize hwp driver check with hwp_active()
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Penny Zheng <Penny.Zheng@xxxxxxx>
- Date: Tue, 27 May 2025 16:48:28 +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=w8UNDtkJ77Jej48aHtABIfIEduYhPVXTw5TZb7gBSLo=; b=YvTzvSsz7/Y1BCH3fzCW1X0fZmsXmJA4mxJp2ELz8HJt2M7KFygjcDAwmEhb9RWecgaejtsdKzhjywqtCDUHQ1N4/3QNEHaPRFXAv/TYk/FSfTxntWqTK2srlnNgHR6aFU4S39Zkc3T5fNC52NsiQwZW4UM2T6w7K5Qw/vtILV0YjS7yH1jC9YXQldDey3DmTh6FVoi1BfUSQpRrKs1MDGMTPrzQlGRLxhcO6E3ob/LYgtM2EAaB5NwG1/lRnsdA0h+7P+9Qcy4lNnnfWIWDPDwCCMA0SZcdSKGroHRB34OgDYRgEJ9VP0zHdp/JKNU5EM/WPhGH4ivLwTyEh3YJ+w==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=i7Zm4GZQMTHpOJ/utqLehAb078P5Mxqsc/OC+NByfLRAW9CHiM2PxiYe/9BzNhd0/mQmb3ajefmTFcFdYeJ5g0it0dvh6kmedbvND57q9MPH5nB3soYWxzXdnkA69dqZqkL7QaTmqUKE3GJS2vPFWTZJe1Cbu+SswpEYMbyVP4JJchBhd7vNQCgDMCjSMRrzspojY/w02TQCYubqzrnZvXgsJ6poIC6v4qlg781CrHAmoWkE1VKRcDqH+3F+2EqIyZmH3xAa0KzlDPIRXWVjMnlIsJuBd/YUGXDScq0se/tNKLT0B6GGwyzIx4KksRPCSXLZbQThoo2o/KY9r5/LOQ==
- Cc: <ray.huang@xxxxxxx>, Penny Zheng <Penny.Zheng@xxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
- Delivery-date: Tue, 27 May 2025 08:51:08 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
Instead of using hypercall passing parameter to identify hwp driver,
we shall use hwp_active(). Also, we've already used hwp_active() in
do_get_pm_info() in the same file to do hwp driver check, it's
better syncing with same way.
Signed-off-by: Penny Zheng <Penny.Zheng@xxxxxxx>
---
v4 -> v5:
- new commit
---
xen/drivers/acpi/pmstat.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/xen/drivers/acpi/pmstat.c b/xen/drivers/acpi/pmstat.c
index 514475cf5c..c09e001ec3 100644
--- a/xen/drivers/acpi/pmstat.c
+++ b/xen/drivers/acpi/pmstat.c
@@ -253,9 +253,7 @@ static int get_cpufreq_para(struct xen_sysctl_pm_op *op)
else
strlcpy(op->u.get_para.scaling_driver, "Unknown", CPUFREQ_NAME_LEN);
- if ( IS_ENABLED(CONFIG_INTEL) &&
- !strncmp(op->u.get_para.scaling_driver, XEN_HWP_DRIVER_NAME,
- CPUFREQ_NAME_LEN) )
+ if ( hwp_active() )
ret = get_hwp_para(policy->cpu, &op->u.get_para.u.cppc_para);
else
{
--
2.34.1
|