[PATCH 4/5] cpufreq: Add cpufreq driver for the RISC-V RPMI performance service group
Joshua Yeong
joshua.yeong at starfivetech.com
Wed Jan 7 22:48:06 PST 2026
On Thursday, January 8, 2026 11:27 AM, Viresh Kumar <viresh.kumar at linaro.org> wrote:
> On 06-01-26, 17:21, Joshua Yeong wrote:
> > diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index
> > 78702a08364f..9aaa1f71000e 100644
> > --- a/drivers/cpufreq/Kconfig
> > +++ b/drivers/cpufreq/Kconfig
> > @@ -4,8 +4,8 @@ menu "CPU Frequency scaling"
> > config CPU_FREQ
> > bool "CPU Frequency scaling"
> > help
> > - CPU Frequency scaling allows you to change the clock speed of
> > - CPUs on the fly. This is a nice method to save power, because
> > + CPU Frequency scaling allows you to change the clock speed of
> > + CPUs on the fly. This is a nice method to save power, because
> > the lower the CPU clock speed, the less power the CPU consumes.
> >
> > Note that this driver doesn't automatically change the CPU @@
> > -65,7 +65,7 @@ config CPU_FREQ_DEFAULT_GOV_USERSPACE
> > select CPU_FREQ_GOV_USERSPACE
> > help
> > Use the CPUFreq governor 'userspace' as default. This allows
> > - you to set the CPU frequency manually or when a userspace
> > + you to set the CPU frequency manually or when a userspace
> > program shall be able to set the CPU dynamically without having
> > to enable the userspace governor manually.
> >
> > @@ -134,7 +134,7 @@ config CPU_FREQ_GOV_USERSPACE
> > help
> > Enable this cpufreq governor when you either want to set the
> > CPU frequency manually or when a userspace program shall
> > - be able to set the CPU dynamically, like on LART
> > + be able to set the CPU dynamically, like on LART
> > <http://www.lartmaker.nl/>.
> >
> > To compile this driver as a module, choose M here: the @@ -147,11
> > +147,11 @@ config CPU_FREQ_GOV_ONDEMAND
> > select CPU_FREQ_GOV_COMMON
> > help
> > 'ondemand' - This driver adds a dynamic cpufreq policy governor.
> > - The governor does a periodic polling and
> > + The governor does a periodic polling and
> > changes frequency based on the CPU utilization.
> > The support for this governor depends on CPU capability to
> > do fast frequency switching (i.e, very low latency frequency
> > - transitions).
> > + transitions).
> >
> > To compile this driver as a module, choose M here: the
> > module will be called cpufreq_ondemand.
> > @@ -367,4 +367,18 @@ config ACPI_CPPC_CPUFREQ_FIE
> >
> > endif
>
> Unrelated changes ?
Hi Viresh,
Will remove the blank space in V2 patch.
>
> > +++ b/drivers/cpufreq/riscv-rpmi-cpufreq.c
> > +static int rpmi_cpufreq_probe(struct platform_device *pdev) {
>
> > +fail_free_channel:
> > + mbox_free_channel(mpxy_ctx->chan);
> > +
> > + return ret;
> > +}
> > +
> > +static void rpmi_cpufreq_remove(struct platform_device *pdev) {
> > + cpufreq_unregister_driver(&rpmi_perf_cpufreq_driver);
>
> Don't need to free mpxy_ctx->chan ?
>
Ok will update this.
> --
> viresh
More information about the linux-riscv
mailing list