All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cpu: rid cpu_hotplug_disabled check for cpu_down()
@ 2013-04-29  2:49 liguang
  2013-04-29  4:30 ` Srivatsa S. Bhat
  0 siblings, 1 reply; 5+ messages in thread
From: liguang @ 2013-04-29  2:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Srivatsa S. Bhat,
	Yasuaki Ishimatsu, Anton Vorontsov, liguang

in cpu_down(), _cpu_down() will do
"
        if (num_online_cpus() == 1)
                 return -EBUSY;
"
when cpu_hotplug_disabled was set, num_online_cpus
will return 1 for there's only 1 boot cpu.
so, it's unnecessary to check cpu_hotplug_disabled
here.

Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
---
 kernel/cpu.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/kernel/cpu.c b/kernel/cpu.c
index b5e4ab2..cd166d3 100644
--- a/kernel/cpu.c
+++ b/kernel/cpu.c
@@ -330,14 +330,8 @@ int __ref cpu_down(unsigned int cpu)
 
 	cpu_maps_update_begin();
 
-	if (cpu_hotplug_disabled) {
-		err = -EBUSY;
-		goto out;
-	}
-
 	err = _cpu_down(cpu, 0);
 
-out:
 	cpu_maps_update_done();
 	return err;
 }
-- 
1.7.2.5


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-29  6:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-29  2:49 [PATCH] cpu: rid cpu_hotplug_disabled check for cpu_down() liguang
2013-04-29  4:30 ` Srivatsa S. Bhat
2013-04-29  4:42   ` li guang
2013-04-29  4:59     ` Srivatsa S. Bhat
2013-04-29  5:20       ` li guang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.