On 14.04.2025 09:40, Penny Zheng wrote: > We need to bypass construction of px statistic info in > cpufreq_statistic_init() for amd-cppc mode, as P-states is not necessary > there.
Is it really "need"? What goes wrong if we went through this initialization? For now it feels more like an optimization to me, i.e. "want". Also ... > --- 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); ... you're specifically not bypassing the spin_lock_init(), for a good reason. With respective clarification in the description: Acked-by: Jan Beulich <jbeul...@suse.com> Jan