From: liguang <lig.fnst@cn.fujitsu.com>
To: linux-kernel@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@linux-foundation.org>,
"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>,
Anton Vorontsov <anton.vorontsov@linaro.org>,
liguang <lig.fnst@cn.fujitsu.com>
Subject: [PATCH] cpu: rid cpu_hotplug_disabled check for cpu_down()
Date: Mon, 29 Apr 2013 10:49:51 +0800 [thread overview]
Message-ID: <1367203791-9723-1-git-send-email-lig.fnst@cn.fujitsu.com> (raw)
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
next reply other threads:[~2013-04-29 2:52 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-29 2:49 liguang [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1367203791-9723-1-git-send-email-lig.fnst@cn.fujitsu.com \
--to=lig.fnst@cn.fujitsu.com \
--cc=akpm@linux-foundation.org \
--cc=anton.vorontsov@linaro.org \
--cc=isimatu.yasuaki@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®