From: Beata Michalska <beata.michalska@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org,
ionela.voinescu@arm.com, sudeep.holla@arm.com, will@kernel.org,
catalin.marinas@arm.com, rafael@kernel.org, sumitg@nvidia.com,
yang@os.amperecomputing.com, vanshikonda@os.amperecomputing.com,
lihuisong@huawei.com, zhanjie9@hisilicon.com,
Jonathan Corbet <corbet@lwn.net>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H . Peter Anvin" <hpa@zytor.com>, Phil Auld <pauld@redhat.com>,
x86@kernel.org, linux-doc@vger.kernel.org
Subject: Re: [PATCH v8 1/4] cpufreq: Introduce an optional cpuinfo_avg_freq sysfs entry
Date: Mon, 16 Dec 2024 23:15:13 +0100 [thread overview]
Message-ID: <Z2CmcelSy89NULtz@arm.com> (raw)
In-Reply-To: <20241212065100.sjb7lrlmksbm2hdk@vireshk-i7>
On Thu, Dec 12, 2024 at 12:21:00PM +0530, Viresh Kumar wrote:
> On 06-12-24, 13:55, Beata Michalska wrote:
> > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> > index 04fc786dd2c0..70df2a24437b 100644
> > --- a/drivers/cpufreq/cpufreq.c
> > +++ b/drivers/cpufreq/cpufreq.c
> > @@ -747,9 +747,14 @@ show_one(cpuinfo_transition_latency, cpuinfo.transition_latency);
> > show_one(scaling_min_freq, min);
> > show_one(scaling_max_freq, max);
> >
> > -__weak unsigned int arch_freq_get_on_cpu(int cpu)
> > +__weak int arch_freq_get_on_cpu(int cpu)
> > {
> > - return 0;
> > + return -EOPNOTSUPP;
>
> I did suggest not doing this as it may not be acceptable.
>
> https://lore.kernel.org/all/CAKohpokFUpQyHYO017kOn-Jbt0CFZ1GuxoG3N-fenWJ_poW=4Q@mail.gmail.com/
>
My bad as I must have misinterpreted that message. Although I am not entirely
sure why this might be unacceptable as it is not such uncommon approach to use
signed int space to cover both: expected positive value as well as potential
error code case failure.
Enabling the new attribute for all is an option, tough not entirely compelling
one as exposing a feature that is known not to be supported seems bit
counterintuitive. On the other hand using cpufreq driver flags won't help much
as the support for the new attrib is platform-specific, not driver-specific.
---
BR
Beata
> --
> viresh
next prev parent reply other threads:[~2024-12-16 22:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 13:55 [PATCH v8 0/4] Add support for AArch64 AMUv1-based average freq Beata Michalska
2024-12-06 13:55 ` [PATCH v8 1/4] cpufreq: Introduce an optional cpuinfo_avg_freq sysfs entry Beata Michalska
2024-12-12 6:51 ` Viresh Kumar
2024-12-16 22:15 ` Beata Michalska [this message]
2024-12-17 4:27 ` Viresh Kumar
2024-12-17 20:10 ` Beata Michalska
2024-12-18 4:11 ` Viresh Kumar
2024-12-19 11:57 ` Beata Michalska
2024-12-16 5:43 ` Kai-Heng Feng
2024-12-16 7:11 ` Sumit Gupta
2024-12-16 8:33 ` Kai-Heng Feng
2024-12-16 22:32 ` Beata Michalska
2024-12-16 22:21 ` Beata Michalska
2024-12-06 13:55 ` [PATCH v8 2/4] arm64: amu: Delay allocating cpumask for AMU FIE support Beata Michalska
2024-12-06 13:55 ` [PATCH v8 3/4] arm64: Provide an AMU-based version of arch_freq_get_on_cpu Beata Michalska
2024-12-06 13:56 ` [PATCH v8 4/4] arm64: Update AMU-based freq scale factor on entering idle Beata Michalska
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Z2CmcelSy89NULtz@arm.com \
--to=beata.michalska@arm.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=corbet@lwn.net \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=ionela.voinescu@arm.com \
--cc=lihuisong@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pauld@redhat.com \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=sumitg@nvidia.com \
--cc=tglx@linutronix.de \
--cc=vanshikonda@os.amperecomputing.com \
--cc=viresh.kumar@linaro.org \
--cc=will@kernel.org \
--cc=x86@kernel.org \
--cc=yang@os.amperecomputing.com \
--cc=zhanjie9@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).