lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z5K42yXtcDSZGuUF@arm.com>
Date: Thu, 23 Jan 2025 22:47:07 +0100
From: Beata Michalska <beata.michalska@....com>
To: Viresh Kumar <viresh.kumar@...aro.org>
Cc: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-pm@...r.kernel.org, ionela.voinescu@....com,
	sudeep.holla@....com, will@...nel.org, catalin.marinas@....com,
	rafael@...nel.org, sumitg@...dia.com, yang@...amperecomputing.com,
	vanshikonda@...amperecomputing.com, lihuisong@...wei.com,
	zhanjie9@...ilicon.com, Jonathan Corbet <corbet@....net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	"H . Peter Anvin" <hpa@...or.com>, Phil Auld <pauld@...hat.com>,
	x86@...nel.org, linux-doc@...r.kernel.org
Subject: Re: [PATCH v9 2/5] cpufreq: Introduce an optional cpuinfo_avg_freq
 sysfs entry

On Wed, Jan 22, 2025 at 11:39:02AM +0530, Viresh Kumar wrote:
> On 21-01-25, 16:17, Beata Michalska wrote:
> > On Tue, Jan 21, 2025 at 04:23:55PM +0530, Viresh Kumar wrote:
> > > On 21-01-25, 08:44, Beata Michalska wrote:
> > > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > > > index 6f45684483c4..b2a8efa83c98 100644
> > > > --- a/drivers/cpufreq/cpufreq.c
> > > > +++ b/drivers/cpufreq/cpufreq.c
> > > > @@ -733,12 +733,20 @@ __weak int arch_freq_get_on_cpu(int cpu)
> > > >  	return -EOPNOTSUPP;
> > > >  }
> > > >  
> > > >  static ssize_t show_scaling_cur_freq(struct cpufreq_policy *policy, char *buf)
> > > >  {
> > > >  	ssize_t ret;
> > > >  	int freq;
> > > >  
> > > > -	freq = arch_freq_get_on_cpu(policy->cpu);
> > > > +	freq = IS_ENABLED(CONFIG_CPUFREQ_ARCH_CUR_FREQ)
> > > > +		? arch_freq_get_on_cpu(policy->cpu)
> > > > +		: 0;
> > > > +
> > > >  	if (freq > 0)
> > > >  		ret = sysfs_emit(buf, "%u\n", freq);
> > > >  	else if (cpufreq_driver->setpolicy && cpufreq_driver->get)
> > > 
> > > Maybe this should be a separate commit ? And also I am not very happy
> > Initially it was supposed to be one, but then the rest of the series justifies
> > the changes so it made sense to send those in one go.
> > > with the new kconfig option. I don't want others to use it as we want
> > > to get rid of this for X86 too eventually. Making it a kconfig option
> > > allows anyone to enable it and then depend on it without us knowing..
> > > 
> > > Rather just write it as "if (x86)", with a comment on what we plan to
> > > do with it in few release cycles.
> > Right, those changes are based on discussion in [1].
> 
> Ahh I see.. What about making it depend on X86 for now, as we really
> don't want new users to use it ?
Do you mean the new config option? If so, it is in Kconfig.x86 already.
Unless you have smth else in mind ?

---
BR
Beata
> 
> -- 
> viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ