[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xen staging] xen/cpufreq: normalize hwp driver check with hwp_active()



commit 25972d5b5c26afbfceb1284cdab0404a46a0baf0
Author:     Penny Zheng <Penny.Zheng@xxxxxxx>
AuthorDate: Wed Jun 18 09:24:24 2025 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Wed Jun 18 09:24:24 2025 +0200

    xen/cpufreq: normalize hwp driver check with hwp_active()
    
    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>
    Acked-by: Jan Beulich <jbeulich@xxxxxxxx>
---
 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 b4e8514f91..2a1f5493fa 100644
--- a/xen/drivers/acpi/pmstat.c
+++ b/xen/drivers/acpi/pmstat.c
@@ -422,9 +422,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
     {
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.