From: Rusty Russell <rusty@rustcorp.com.au>
To: linux-kernel@vger.kernel.org
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Jeff Dike <jdike@addtoit.com>,
Richard Weinberger <richard@nod.at>,
user-mode-linux-devel@lists.sourceforge.net
Subject: [PATCH 07/16] um: fix up obsolete cpu function usage.
Date: Mon, 2 Mar 2015 22:05:48 +1030 [thread overview]
Message-ID: <1425296150-4722-7-git-send-email-rusty@rustcorp.com.au> (raw)
In-Reply-To: <1425296150-4722-1-git-send-email-rusty@rustcorp.com.au>
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
next prev parent reply other threads:[~2015-03-02 11:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 11:35 [PATCH 01/16] CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS: set if CPUMASK_OFFSTACK Rusty Russell
2015-03-02 11:35 ` [PATCH 02/16] cpumask: fix cpu-hotplug documentation Rusty Russell
2015-03-02 11:35 ` [PATCH 03/16] ia64: Use for_each_cpu_and() and cpumask_any_and() instead of temp var Rusty Russell
2015-03-02 11:35 ` [PATCH 04/16] drivers: fix up obsolete cpu function usage Rusty Russell
2015-03-02 22:23 ` Rafael J. Wysocki
2015-03-02 11:35 ` [PATCH 05/16] staging/lustre: " Rusty Russell
2015-03-02 17:50 ` Oleg Drokin
2015-03-02 23:39 ` Rusty Russell
2015-03-03 1:16 ` Oleg Drokin
2015-03-03 3:12 ` Rusty Russell
2015-03-02 11:35 ` [PATCH 06/16] ia64: " Rusty Russell
2015-05-26 20:45 ` Tony Luck
2015-05-27 1:18 ` Rusty Russell
2015-05-27 17:37 ` Tony Luck
2015-05-28 3:44 ` Rusty Russell
2015-03-02 11:35 ` Rusty Russell [this message]
2015-03-02 11:35 ` [PATCH 08/16] x86: " Rusty Russell
2015-03-02 13:36 ` [tip:x86/cleanups] x86: Fix up obsolete __cpu_set() " tip-bot for Rusty Russell
2015-03-02 11:35 ` [PATCH 09/16] mips: fix up obsolete cpu " Rusty Russell
2015-03-02 12:34 ` [PATCH 01/16] CONFIG_DISABLE_OBSOLETE_CPUMASK_FUNCTIONS: set if CPUMASK_OFFSTACK Paul Bolle
2015-03-02 23:40 ` Rusty Russell
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=1425296150-4722-7-git-send-email-rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=jdike@addtoit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=richard@nod.at \
--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).