From: Venkatesh Pallipadi <venki@google.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Tony Luck <tony.luck@gmail.com>,
"Srivatsa S. Bhat" <srivatsa.bhat@linux.vnet.ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Mike Travis <travis@sgi.com>,
"Paul E. McKenney" <paul.mckenney@linaro.org>,
"Rafael J. Wysocki" <rjw@sisk.pl>,
Paul Gortmaker <paul.gortmaker@windriver.com>,
linux-kernel@vger.kernel.org, Richard Kuo <rkuo@codeaurora.org>,
linux-hexagon@vger.kernel.org, Ralf Baechle <ralf@linux-mips.org>,
linux-mips@linux-mips.org, Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
user-mode-linux-devel@lists.sourceforge.net,
Venkatesh Pallipadi <venki@google.com>
Subject: [PATCH 3/3] um: Avoid raw handling of cpu_online_map
Date: Tue, 14 Feb 2012 14:49:44 -0800 [thread overview]
Message-ID: <1329259784-20592-4-git-send-email-venki@google.com> (raw)
In-Reply-To: <1329259784-20592-1-git-send-email-venki@google.com>
Use init_cpu_online and set_cpu_online instead.
Signed-off-by: Venkatesh Pallipadi <venki@google.com>
---
arch/um/kernel/skas/process.c | 2 +-
arch/um/kernel/smp.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/um/kernel/skas/process.c b/arch/um/kernel/skas/process.c
index 2e9852c..5daa0f5 100644
--- a/arch/um/kernel/skas/process.c
+++ b/arch/um/kernel/skas/process.c
@@ -41,7 +41,7 @@ static int __init start_kernel_proc(void *unused)
cpu_tasks[0].pid = pid;
cpu_tasks[0].task = current;
#ifdef CONFIG_SMP
- cpu_online_map = cpumask_of_cpu(0);
+ init_cpu_online(cpumask_of(0));
#endif
start_kernel();
return 0;
diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
index 155206a..b5d2ca9 100644
--- a/arch/um/kernel/smp.c
+++ b/arch/um/kernel/smp.c
@@ -76,7 +76,7 @@ static int idle_proc(void *cpup)
cpu_relax();
notify_cpu_starting(cpu);
- cpu_set(cpu, cpu_online_map);
+ set_cpu_online(cpu, true);
default_idle();
return 0;
}
@@ -110,8 +110,8 @@ void smp_prepare_cpus(unsigned int maxcpus)
for (i = 0; i < ncpus; ++i)
set_cpu_possible(i, true);
- cpu_clear(me, cpu_online_map);
- cpu_set(me, cpu_online_map);
+ set_cpu_online(me, false);
+ set_cpu_online(me, true);
cpu_set(me, cpu_callin_map);
err = os_pipe(cpu_data[me].ipi_pipe, 1, 1);
@@ -138,7 +138,7 @@ void smp_prepare_cpus(unsigned int maxcpus)
void smp_prepare_boot_cpu(void)
{
- cpu_set(smp_processor_id(), cpu_online_map);
+ set_cpu_online(smp_processor_id(), true);
}
int __cpu_up(unsigned int cpu)
--
1.7.7.3
next prev parent reply other threads:[~2012-02-14 22:52 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-18 2:07 [PATCH] Avoid mask based num_possible_cpus and num_online_cpus Venkatesh Pallipadi
2012-01-18 5:55 ` KOSAKI Motohiro
2012-01-18 18:52 ` Venki Pallipadi
2012-01-18 19:20 ` KOSAKI Motohiro
2012-01-19 20:01 ` Venkatesh Pallipadi
2012-01-19 20:40 ` KOSAKI Motohiro
2012-01-21 1:01 ` Venki Pallipadi
2012-01-19 20:43 ` Srivatsa S. Bhat
2012-01-20 23:09 ` Venki Pallipadi
2012-01-20 23:45 ` KOSAKI Motohiro
2012-01-20 23:55 ` Venki Pallipadi
2012-01-23 5:22 ` Srivatsa S. Bhat
2012-01-23 19:28 ` Venki Pallipadi
2012-01-24 2:34 ` [PATCH] Avoid mask based num_possible_cpus and num_online_cpus -v3 Venkatesh Pallipadi
2012-01-24 19:22 ` Srivatsa S. Bhat
2012-01-24 19:30 ` KOSAKI Motohiro
2012-01-24 21:01 ` Venki Pallipadi
2012-01-24 23:25 ` [PATCH] Avoid mask based num_possible_cpus and num_online_cpus -v4 Venkatesh Pallipadi
2012-01-26 17:22 ` Srivatsa S. Bhat
2012-01-26 17:27 ` Srivatsa S. Bhat
2012-01-26 21:25 ` KOSAKI Motohiro
2012-01-26 23:22 ` Andrew Morton
2012-01-27 23:58 ` Venki Pallipadi
2012-02-01 0:17 ` [PATCH] Avoid mask based num_possible_cpus and num_online_cpus -v5 Venkatesh Pallipadi
2012-02-01 22:01 ` Andrew Morton
2012-02-02 20:03 ` Rusty Russell
2012-02-02 20:19 ` Andrew Morton
2012-02-02 21:00 ` Venki Pallipadi
2012-02-13 19:54 ` Tony Luck
2012-02-13 20:04 ` Venki Pallipadi
2012-02-13 20:25 ` Srivatsa S. Bhat
2012-02-13 20:43 ` Venki Pallipadi
2012-02-13 20:55 ` Srivatsa S. Bhat
2012-02-13 20:44 ` Srivatsa S. Bhat
2012-02-13 21:57 ` Tony Luck
2012-02-14 9:25 ` Rusty Russell
2012-02-14 21:35 ` Srivatsa S. Bhat
2012-02-14 23:00 ` Tony Luck
2012-02-14 22:49 ` [PATCH 0/3] Cleanup raw handling of online/possible map Venkatesh Pallipadi
2012-02-14 22:49 ` [PATCH 1/3] hexagon: Avoid raw handling of cpu_possible_map Venkatesh Pallipadi
2012-02-14 22:49 ` [PATCH 2/3] mips: Avoid raw handling of cpu_possible_map/cpu_online_map Venkatesh Pallipadi
2012-02-27 22:19 ` David Daney
2012-02-14 22:49 ` Venkatesh Pallipadi [this message]
2012-02-27 21:55 ` [PATCH] Avoid mask based num_possible_cpus and num_online_cpus -v5 David Daney
2012-02-27 22:07 ` Andrew Morton
2012-02-27 22:16 ` David Daney
2012-03-01 18:32 ` Venki Pallipadi
2012-02-28 5:01 ` Stephen Rothwell
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=1329259784-20592-4-git-send-email-venki@google.com \
--to=venki@google.com \
--cc=akpm@linux-foundation.org \
--cc=jdike@addtoit.com \
--cc=kosaki.motohiro@gmail.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-hexagon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=paul.gortmaker@windriver.com \
--cc=paul.mckenney@linaro.org \
--cc=ralf@linux-mips.org \
--cc=richard@nod.at \
--cc=rjw@sisk.pl \
--cc=rkuo@codeaurora.org \
--cc=rusty@rustcorp.com.au \
--cc=srivatsa.bhat@linux.vnet.ibm.com \
--cc=tony.luck@gmail.com \
--cc=travis@sgi.com \
--cc=user-mode-linux-devel@lists.sourceforge.net \
/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;
as well as URLs for NNTP newsgroup(s).