aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/loongson2_cpufreq.c
diff options
context:
space:
mode:
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>2017-04-04 17:49:57 +0200
committerRalf Baechle <ralf@linux-mips.org>2017-04-12 13:52:21 +0200
commit759f534e93ace6a94a3c0718611fcf70dd5f7809 (patch)
treef5d71eb01aef9c31a47f61bd583dfbdd99af377d /drivers/cpufreq/loongson2_cpufreq.c
parentMIPS: uasm: Remove needless ISA abstraction (diff)
downloadlinux-dev-759f534e93ace6a94a3c0718611fcf70dd5f7809.tar.xz
linux-dev-759f534e93ace6a94a3c0718611fcf70dd5f7809.zip
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>
Diffstat (limited to 'drivers/cpufreq/loongson2_cpufreq.c')
-rw-r--r--drivers/cpufreq/loongson2_cpufreq.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/cpufreq/loongson2_cpufreq.c b/drivers/cpufreq/loongson2_cpufreq.c
index 6bbdac1065ff..9ac27b22476c 100644
--- a/drivers/cpufreq/loongson2_cpufreq.c
+++ b/drivers/cpufreq/loongson2_cpufreq.c
@@ -51,19 +51,12 @@ static int loongson2_cpu_freq_notifier(struct notifier_block *nb,
static int loongson2_cpufreq_target(struct cpufreq_policy *policy,
unsigned int index)
{
- unsigned int cpu = policy->cpu;
- cpumask_t cpus_allowed;
unsigned int freq;
- cpus_allowed = current->cpus_allowed;
- set_cpus_allowed_ptr(current, cpumask_of(cpu));
-
freq =
((cpu_clock_freq / 1000) *
loongson2_clockmod_table[index].driver_data) / 8;
- set_cpus_allowed_ptr(current, &cpus_allowed);
-
/* setting the cpu frequency */
clk_set_rate(policy->clk, freq * 1000);