diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-02-01 21:40:42 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-02-01 21:40:42 +0300 |
commit | d4ea2bd1bb502c54380cc44a4130660494679bb8 (patch) | |
tree | 7d14962a86c24026ce2eee8f9e67db610db23fd8 /drivers/cpufreq/amd-pstate.c | |
parent | eaa1b01fe709d6a236a9cec74813e0400601fd23 (diff) | |
parent | e81fdba0208666b65bafeaba814874b4d6e5edde (diff) | |
download | linux-d4ea2bd1bb502c54380cc44a4130660494679bb8.tar.xz |
Merge tag 'asoc-fix-v6.8-rc2-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.8
This pull request adds Richard Fitzgerald's series with extensive fixes
for the CS35L56, he said:
These patches fix various things that were undocumented, unknown or
uncertain when the original driver code was written. And also a few
things that were just bugs.
Diffstat (limited to 'drivers/cpufreq/amd-pstate.c')
-rw-r--r-- | drivers/cpufreq/amd-pstate.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c index 1f6186475715..1791d37fbc53 100644 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@ -1232,14 +1232,13 @@ static void amd_pstate_epp_update_limit(struct cpufreq_policy *policy) max_limit_perf = div_u64(policy->max * cpudata->highest_perf, cpudata->max_freq); min_limit_perf = div_u64(policy->min * cpudata->highest_perf, cpudata->max_freq); + WRITE_ONCE(cpudata->max_limit_perf, max_limit_perf); + WRITE_ONCE(cpudata->min_limit_perf, min_limit_perf); + max_perf = clamp_t(unsigned long, max_perf, cpudata->min_limit_perf, cpudata->max_limit_perf); min_perf = clamp_t(unsigned long, min_perf, cpudata->min_limit_perf, cpudata->max_limit_perf); - - WRITE_ONCE(cpudata->max_limit_perf, max_limit_perf); - WRITE_ONCE(cpudata->min_limit_perf, min_limit_perf); - value = READ_ONCE(cpudata->cppc_req_cached); if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) |