diff options
| author | Viresh Kumar <viresh.kumar@linaro.org> | 2025-05-20 11:24:12 +0530 |
|---|---|---|
| committer | Viresh Kumar <viresh.kumar@linaro.org> | 2025-05-20 11:24:12 +0530 |
| commit | c410aabd0321468b6569f31931aa32ddc5897ca9 (patch) | |
| tree | 6eaa0c4b230076bf6d71c8c1ae873c4506fc9c23 /include | |
| parent | a374f28700abd20e8a7d026f89aa26f759445918 (diff) | |
| parent | 06149d8f2216894cee86106c701d13141948f159 (diff) | |
Merge branch 'rust/cpufreq-dt' into cpufreq/arm/linux-next
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/cpufreq.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index 400fee6427a5..f3cf2adea18f 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -170,6 +170,12 @@ struct cpufreq_policy { struct notifier_block nb_max; }; +DEFINE_GUARD(cpufreq_policy_write, struct cpufreq_policy *, + down_write(&_T->rwsem), up_write(&_T->rwsem)) + +DEFINE_GUARD(cpufreq_policy_read, struct cpufreq_policy *, + down_read(&_T->rwsem), up_read(&_T->rwsem)) + /* * Used for passing new cpufreq policy data to the cpufreq driver's ->verify() * callback for sanitization. That callback is only expected to modify the min @@ -235,8 +241,6 @@ void disable_cpufreq(void); u64 get_cpu_idle_time(unsigned int cpu, u64 *wall, int io_busy); -struct cpufreq_policy *cpufreq_cpu_acquire(unsigned int cpu); -void cpufreq_cpu_release(struct cpufreq_policy *policy); int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); void refresh_frequency_limits(struct cpufreq_policy *policy); void cpufreq_update_policy(unsigned int cpu); @@ -395,7 +399,7 @@ struct cpufreq_driver { unsigned int (*get)(unsigned int cpu); /* Called to update policy limits on firmware notifications. */ - void (*update_limits)(unsigned int cpu); + void (*update_limits)(struct cpufreq_policy *policy); /* optional */ int (*bios_limit)(int cpu, unsigned int *limit); |
