Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

CPUFREQ: Loongson2: drop set_cpus_allowed_ptr()

It is pure mystery to me why we need to be on a specific CPU while
looking up a value in an array.
My best shot at this is that before commit d4019f0a92ab ("cpufreq: move
freq change notifications to cpufreq core") it was required to invoke
cpufreq_notify_transition() on a special CPU.

Since it looks like a waste, remove it.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: tglx@linutronix.de
Cc: linux-pm@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/15888/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

authored by

Sebastian Andrzej Siewior and committed by
Ralf Baechle
759f534e 33679a50

-7
-7
drivers/cpufreq/loongson2_cpufreq.c
··· 51 51 static int loongson2_cpufreq_target(struct cpufreq_policy *policy, 52 52 unsigned int index) 53 53 { 54 - unsigned int cpu = policy->cpu; 55 - cpumask_t cpus_allowed; 56 54 unsigned int freq; 57 - 58 - cpus_allowed = current->cpus_allowed; 59 - set_cpus_allowed_ptr(current, cpumask_of(cpu)); 60 55 61 56 freq = 62 57 ((cpu_clock_freq / 1000) * 63 58 loongson2_clockmod_table[index].driver_data) / 8; 64 - 65 - set_cpus_allowed_ptr(current, &cpus_allowed); 66 59 67 60 /* setting the cpu frequency */ 68 61 clk_set_rate(policy->clk, freq * 1000);