linux-um archives
 help / color / mirror / Atom feed
* [uml-devel] [PATCH 07/16] um: fix up obsolete cpu function usage.
       [not found] <1425296150-4722-1-git-send-email-rusty@rustcorp.com.au>
@ 2015-03-02 11:35 ` Rusty Russell
  0 siblings, 0 replies; only message in thread
From: Rusty Russell @ 2015-03-02 11:35 UTC (permalink / raw)
  To: linux-kernel
  Cc: Richard Weinberger, Jeff Dike, Rusty Russell,
	user-mode-linux-devel

Thanks to spatch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Richard Weinberger <richard@nod.at>
Cc: user-mode-linux-devel@lists.sourceforge.net
---
 arch/um/kernel/smp.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/arch/um/kernel/smp.c b/arch/um/kernel/smp.c
index 5c8c3ea7db7b..74077892b34a 100644
--- a/arch/um/kernel/smp.c
+++ b/arch/um/kernel/smp.c
@@ -67,12 +67,12 @@ static int idle_proc(void *cpup)
 	os_set_fd_async(cpu_data[cpu].ipi_pipe[0]);
 
 	wmb();
-	if (cpu_test_and_set(cpu, cpu_callin_map)) {
+	if (cpumask_test_and_set_cpu(cpu, &cpu_callin_map)) {
 		printk(KERN_ERR "huh, CPU#%d already present??\n", cpu);
 		BUG();
 	}
 
-	while (!cpu_isset(cpu, smp_commenced_mask))
+	while (!cpumask_test_cpu(cpu, &smp_commenced_mask))
 		cpu_relax();
 
 	notify_cpu_starting(cpu);
@@ -111,7 +111,7 @@ void smp_prepare_cpus(unsigned int maxcpus)
 		set_cpu_possible(i, true);
 
 	set_cpu_online(me, true);
-	cpu_set(me, cpu_callin_map);
+	cpumask_set_cpu(me, &cpu_callin_map);
 
 	err = os_pipe(cpu_data[me].ipi_pipe, 1, 1);
 	if (err < 0)
@@ -127,11 +127,11 @@ void smp_prepare_cpus(unsigned int maxcpus)
 		init_idle(idle, cpu);
 
 		waittime = 200000000;
-		while (waittime-- && !cpu_isset(cpu, cpu_callin_map))
+		while (waittime-- && !cpumask_test_cpu(cpu, &cpu_callin_map))
 			cpu_relax();
 
 		printk(KERN_INFO "%s\n",
-		       cpu_isset(cpu, cpu_calling_map) ? "done" : "failed");
+		       cpumask_test_cpu(cpu, &cpu_calling_map) ? "done" : "failed");
 	}
 }
 
@@ -142,7 +142,7 @@ void smp_prepare_boot_cpu(void)
 
 int __cpu_up(unsigned int cpu, struct task_struct *tidle)
 {
-	cpu_set(cpu, smp_commenced_mask);
+	cpumask_set_cpu(cpu, &smp_commenced_mask);
 	while (!cpu_online(cpu))
 		mb();
 	return 0;
-- 
2.1.0


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-02 11:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1425296150-4722-1-git-send-email-rusty@rustcorp.com.au>
2015-03-02 11:35 ` [uml-devel] [PATCH 07/16] um: fix up obsolete cpu function usage Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox