Message ID | 20180110061014.29181-1-benh@kernel.crashing.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 349524bc0da698ec77f2057cf4a4948eb6349265 |
Headers | show |
Series | [1/3] powerpc: Don't preempt_disable() in show_cpuinfo() | expand |
On Wed, 2018-01-10 at 06:10:12 UTC, Benjamin Herrenschmidt wrote: > 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. > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/349524bc0da698ec77f2057cf4a494 cheers
On Wed, 2018-01-10 at 06:10:12 UTC, Benjamin Herrenschmidt wrote: > 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. > > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Applied to powerpc fixes, thanks. https://git.kernel.org/powerpc/c/349524bc0da698ec77f2057cf4a494 cheers
diff --git a/arch/powerpc/kernel/setup-common.c b/arch/powerpc/kernel/setup-common.c index 9d213542a48b..8fd3a70047f1 100644 --- a/arch/powerpc/kernel/setup-common.c +++ b/arch/powerpc/kernel/setup-common.c @@ -242,14 +242,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) unsigned short maj; 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 pvr = per_cpu(cpu_pvr, cpu_id); #else @@ -358,9 +350,6 @@ static int show_cpuinfo(struct seq_file *m, void *v) #ifdef CONFIG_SMP seq_printf(m, "\n"); #endif - - preempt_enable(); - /* If this is the last cpu, print the summary */ if (cpumask_next(cpu_id, cpu_online_mask) >= nr_cpu_ids) show_cpuinfo_summary(m);
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. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> --- arch/powerpc/kernel/setup-common.c | 11 ----------- 1 file changed, 11 deletions(-)