From: Rafael J. Wysocki Date: Sat, 19 Apr 2025 10:49:00 +0000 (+0200) Subject: Merge back earlier cpufreq material for 6.16 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=464dc75dfe6a08607aa8896032f19f35486d4c53;p=users%2Fdwmw2%2Flinux.git Merge back earlier cpufreq material for 6.16 --- 464dc75dfe6a08607aa8896032f19f35486d4c53 diff --cc drivers/cpufreq/amd-pstate.c index b961f3a3b5805,b9d59c7425f5d..99ebe14a72230 --- a/drivers/cpufreq/amd-pstate.c +++ b/drivers/cpufreq/amd-pstate.c @@@ -804,13 -811,18 +804,12 @@@ static void amd_pstate_init_prefcore(st cpudata->hw_prefcore = true; - /* - * The priorities can be set regardless of whether or not - * sched_set_itmt_support(true) has been called and it is valid to - * update them at any time after it has been called. - */ + /* Priorities must be initialized before ITMT support can be toggled on. */ sched_set_itmt_core_prio((int)READ_ONCE(cpudata->prefcore_ranking), cpudata->cpu); - - schedule_work(&sched_prefcore_work); } - static void amd_pstate_update_limits(unsigned int cpu) + static void amd_pstate_update_limits(struct cpufreq_policy *policy) { - struct cpufreq_policy *policy __free(put_cpufreq_policy) = cpufreq_cpu_get(cpu); struct amd_cpudata *cpudata; u32 prev_high = 0, cur_high = 0; bool highest_perf_changed = false;