Commit 0c8b8d37 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Greg Kroah-Hartman

powerpc: Don't preempt_disable() in show_cpuinfo()

commit 349524bc upstream.

This causes warnings from cpufreq mutex code. This is also rather
unnecessary and ineffective. If we really want to prevent concurrent
unplug, we could take the unplug read lock but I don't see this being
critical.

Fixes: cd77b5ce ("powerpc/powernv/cpufreq: Fix the frequency read by /proc/cpuinfo")
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Acked-by: default avatarMichal Suchanek <msuchanek@suse.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9488d117
...@@ -228,14 +228,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -228,14 +228,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
unsigned short maj; unsigned short maj;
unsigned short min; unsigned short min;
/* We only show online cpus: disable preempt (overzealous, I
* knew) to prevent cpu going down. */
preempt_disable();
if (!cpu_online(cpu_id)) {
preempt_enable();
return 0;
}
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
pvr = per_cpu(cpu_pvr, cpu_id); pvr = per_cpu(cpu_pvr, cpu_id);
#else #else
...@@ -340,9 +332,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) ...@@ -340,9 +332,6 @@ static int show_cpuinfo(struct seq_file *m, void *v)
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
seq_printf(m, "\n"); seq_printf(m, "\n");
#endif #endif
preempt_enable();
/* If this is the last cpu, print the summary */ /* If this is the last cpu, print the summary */
if (cpumask_next(cpu_id, cpu_online_mask) >= nr_cpu_ids) if (cpumask_next(cpu_id, cpu_online_mask) >= nr_cpu_ids)
show_cpuinfo_summary(m); show_cpuinfo_summary(m);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment