[Public]

> -----Original Message-----
> From: Jason Andryuk <jason.andr...@amd.com>
> Sent: Wednesday, June 11, 2025 4:03 PM
> To: Penny, Zheng <penny.zh...@amd.com>; xen-devel@lists.xenproject.org
> Cc: Huang, Ray <ray.hu...@amd.com>; Jan Beulich <jbeul...@suse.com>
> Subject: Re: [PATCH v5 05/18] xen/cpufreq: refactor cmdline "cpufreq=xxx"
>
> Hi Penny,
>
> On 2025-05-27 04:48, Penny Zheng wrote:
> > A helper function handle_cpufreq_cmdline() is introduced to tidy
> > different handling pathes.
> > We also add a new helper cpufreq_opts_contain() to ignore and warn
> > user redundant setting, like "cpufreq=hwp;hwp;xen"
> >
> > Signed-off-by: Penny Zheng <penny.zh...@amd.com>
>
> > @@ -114,20 +161,14 @@ static int __init cf_check
> > setup_cpufreq_option(const char *str)
> >
> >           if ( choice > 0 || !cmdline_strcmp(str, "xen") )
> >           {
> > -            xen_processor_pmbits |= XEN_PROCESSOR_PM_PX;
> > -            cpufreq_controller = FREQCTL_xen;
> > -            cpufreq_xen_opts[cpufreq_xen_cnt++] = CPUFREQ_xen;
> > -            ret = 0;
> > +            ret = handle_cpufreq_cmdline(CPUFREQ_xen);
>
> Do we need to check ret and error out?  (and below)
>

Right, we need, thanks, will fix

> Thanks,
> Jason
>
> >               if ( arg[0] && arg[1] )
> >                   ret = cpufreq_cmdline_parse(arg + 1, end);
> >           }
> >           else if ( IS_ENABLED(CONFIG_INTEL) && choice < 0 &&
> >                     !cmdline_strcmp(str, "hwp") )
> >           {
> > -            xen_processor_pmbits |= XEN_PROCESSOR_PM_PX;
> > -            cpufreq_controller = FREQCTL_xen;
> > -            cpufreq_xen_opts[cpufreq_xen_cnt++] = CPUFREQ_hwp;
> > -            ret = 0;
> > +            ret = handle_cpufreq_cmdline(CPUFREQ_hwp);
> >               if ( arg[0] && arg[1] )
> >                   ret = hwp_cmdline_parse(arg + 1, end);
> >           }

Reply via email to