lkml.org 
[lkml]   [2013]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] cpu: rid cpu_hotplug_disabled check for cpu_down()
Date
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


\
 
 \ /
  Last update: 2013-04-29 05:01    [W:1.069 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site