|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v3] x86/cpufreq: Add Kconfig option for CPU frequency scaling
On 13/02/2026 10:28 pm, Stefano Stabellini wrote: > diff --git a/xen/arch/x86/platform_hypercall.c > b/xen/arch/x86/platform_hypercall.c > index c6c5135806..a4669090e0 100644 > --- a/xen/arch/x86/platform_hypercall.c > +++ b/xen/arch/x86/platform_hypercall.c > @@ -485,6 +485,7 @@ ret_t do_platform_op( > ret = acpi_enter_sleep(&op->u.enter_acpi_sleep); > break; > > +#ifdef CONFIG_CPUFREQ > case XENPF_change_freq: > ret = -ENOSYS; > if ( cpufreq_controller != FREQCTL_dom0_kernel ) > @@ -544,6 +545,7 @@ ret_t do_platform_op( > ret = -EFAULT; > break; > } > +#endif You must not hide case labels like this. Instead, use: case XENPF_change_freq: ret = -ENOSYS; if ( !IS_ENABLED(CONFIG_CPUFREQ) ) break; ... which in turn ... > > case XENPF_set_processor_pminfo: > switch ( op->u.set_pminfo.type ) > @@ -936,7 +938,7 @@ ret_t do_platform_op( > break; > } > > - out: > + out: __maybe_unused; > spin_unlock(&xenpf_lock); ... removes the need for this hunk. > diff --git a/xen/drivers/acpi/pm-op.c b/xen/drivers/acpi/pm-op.c > index 07bddc58d9..f5caeebb9a 100644 > --- a/xen/drivers/acpi/pm-op.c > +++ b/xen/drivers/acpi/pm-op.c > @@ -367,7 +367,8 @@ int do_pm_op(struct xen_sysctl_pm_op *op) > return ret; > } > > - if ( op->cpuid >= nr_cpu_ids || !cpu_online(op->cpuid) ) > + if ( op->cpuid >= nr_cpu_ids || !cpu_online(op->cpuid) || > + !IS_ENABLED(CPUFREQ) ) Everywhere else in this patch, CONFIG_CPUFREQ. You won't get a compile error for typo-ing a name inside IF_ENABLED(), but it won't function correctly either. ~Andrew
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |