From: Allen Pais <allen.pais@oracle.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH 1/1] [RFC]sparc64: enable cpu hotplug feature
Date: Fri, 11 Mar 2016 14:22:36 +0000 [thread overview]
Message-ID: <56E2D1DC.8080407@oracle.com> (raw)
In-Reply-To: <1456565906-2072-1-git-send-email-allen.pais@oracle.com>
> This patch provides users with an option to
> disable/enable cpu at runtime by writing to
> /sys/devices/system/cpu/cpuX/online field.
>
> Eg:
> $ echo [0/1] > /sys/devices/system/cpu/cpu2/online
>
> Signed-off-by: Allen Pais <allen.pais@oracle.com>
> Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
> ---
> arch/sparc/kernel/smp_64.c | 48 +++++++++++++++++++++++--------------------
> arch/sparc/kernel/sysfs.c | 4 +++
> 2 files changed, 30 insertions(+), 22 deletions(-)
>
> diff --git a/arch/sparc/kernel/smp_64.c b/arch/sparc/kernel/smp_64.c
> index 19cd08d..5ea2f91 100644
> --- a/arch/sparc/kernel/smp_64.c
> +++ b/arch/sparc/kernel/smp_64.c
> @@ -1277,20 +1277,26 @@ int __cpu_up(unsigned int cpu, struct task_struct *tidle)
> {
> int ret = smp_boot_one_cpu(cpu, tidle);
>
> - if (!ret) {
> - cpumask_set_cpu(cpu, &smp_commenced_mask);
> - while (!cpu_online(cpu))
> - mb();
> - if (!cpu_online(cpu)) {
> - ret = -ENODEV;
> - } else {
> - /* On SUN4V, writes to %tick and %stick are
> - * not allowed.
> - */
Any comments on this patch??
Thanks.
next prev parent reply other threads:[~2016-03-11 14:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-27 9:50 [PATCH 1/1] [RFC]sparc64: enable cpu hotplug feature Allen Pais
2016-03-11 14:22 ` Allen Pais [this message]
2016-03-11 14:43 ` Xose Vazquez Perez
2016-03-11 17:13 ` David Miller
2016-03-21 18:22 ` David Miller
2016-03-22 17:49 ` Allen Pais
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=56E2D1DC.8080407@oracle.com \
--to=allen.pais@oracle.com \
--cc=sparclinux@vger.kernel.org \
/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 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.