Skip to content

Commit c410aab

Browse files
committed
Merge branch 'rust/cpufreq-dt' into cpufreq/arm/linux-next
2 parents a374f28 + 06149d8 commit c410aab

File tree

24 files changed

+3826
-299
lines changed

24 files changed

+3826
-299
lines changed

MAINTAINERS

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5883,6 +5883,8 @@ F: include/dt-bindings/clock/
58835883
F: include/linux/clk-pr*
58845884
F: include/linux/clk/
58855885
F: include/linux/of_clk.h
5886+
F: rust/helpers/clk.c
5887+
F: rust/kernel/clk.rs
58865888
X: drivers/clk/clkdev.c
58875889

58885890
COMMON INTERNET FILE SYSTEM CLIENT (CIFS and SMB3)
@@ -6140,6 +6142,7 @@ F: drivers/cpufreq/
61406142
F: include/linux/cpufreq.h
61416143
F: include/linux/sched/cpufreq.h
61426144
F: kernel/sched/cpufreq*.c
6145+
F: rust/kernel/cpufreq.rs
61436146
F: tools/testing/selftests/cpufreq/
61446147

61456148
CPU HOTPLUG
@@ -6153,6 +6156,7 @@ F: include/linux/cpuhotplug.h
61536156
F: include/linux/smpboot.h
61546157
F: kernel/cpu.c
61556158
F: kernel/smpboot.*
6159+
F: rust/kernel/cpu.rs
61566160

61576161
CPU IDLE TIME MANAGEMENT FRAMEWORK
61586162
M: "Rafael J. Wysocki" <rafael@kernel.org>
@@ -6237,6 +6241,12 @@ L: linux-riscv@lists.infradead.org
62376241
S: Maintained
62386242
F: drivers/cpuidle/cpuidle-riscv-sbi.c
62396243

6244+
CPUMASK API [RUST]
6245+
M: Viresh Kumar <viresh.kumar@linaro.org>
6246+
R: Yury Norov <yury.norov@gmail.com>
6247+
S: Maintained
6248+
F: rust/kernel/cpumask.rs
6249+
62406250
CRAMFS FILESYSTEM
62416251
M: Nicolas Pitre <nico@fluxnic.net>
62426252
S: Maintained
@@ -18156,6 +18166,7 @@ F: Documentation/devicetree/bindings/opp/
1815618166
F: Documentation/power/opp.rst
1815718167
F: drivers/opp/
1815818168
F: include/linux/pm_opp.h
18169+
F: rust/kernel/opp.rs
1815918170

1816018171
OPL4 DRIVER
1816118172
M: Clemens Ladisch <clemens@ladisch.de>

drivers/cpufreq/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,18 @@ config CPUFREQ_DT
217217

218218
If in doubt, say N.
219219

220+
config CPUFREQ_DT_RUST
221+
tristate "Rust based Generic DT based cpufreq driver"
222+
depends on HAVE_CLK && OF && RUST
223+
select CPUFREQ_DT_PLATDEV
224+
select PM_OPP
225+
help
226+
This adds a Rust based generic DT based cpufreq driver for frequency
227+
management. It supports both uniprocessor (UP) and symmetric
228+
multiprocessor (SMP) systems.
229+
230+
If in doubt, say N.
231+
220232
config CPUFREQ_VIRT
221233
tristate "Virtual cpufreq driver"
222234
depends on GENERIC_ARCH_TOPOLOGY

drivers/cpufreq/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_COMMON) += cpufreq_governor.o
1515
obj-$(CONFIG_CPU_FREQ_GOV_ATTR_SET) += cpufreq_governor_attr_set.o
1616

1717
obj-$(CONFIG_CPUFREQ_DT) += cpufreq-dt.o
18+
obj-$(CONFIG_CPUFREQ_DT_RUST) += rcpufreq_dt.o
1819
obj-$(CONFIG_CPUFREQ_DT_PLATDEV) += cpufreq-dt-platdev.o
1920
obj-$(CONFIG_CPUFREQ_VIRT) += virtual-cpufreq.o
2021

drivers/cpufreq/amd-pstate.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -821,19 +821,16 @@ static void amd_pstate_init_prefcore(struct amd_cpudata *cpudata)
821821
schedule_work(&sched_prefcore_work);
822822
}
823823

824-
static void amd_pstate_update_limits(unsigned int cpu)
824+
static void amd_pstate_update_limits(struct cpufreq_policy *policy)
825825
{
826-
struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu);
827826
struct amd_cpudata *cpudata;
828827
u32 prev_high = 0, cur_high = 0;
829828
bool highest_perf_changed = false;
829+
unsigned int cpu = policy->cpu;
830830

831831
if (!amd_pstate_prefcore)
832832
return;
833833

834-
if (!policy)
835-
return;
836-
837834
if (amd_get_highest_perf(cpu, &cur_high))
838835
return;
839836

0 commit comments

Comments
 (0)