From: Rusty Russell <rusty@rustcorp.com.au>
To: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Cc: Ingo Molnar <mingo@elte.hu>, Mike Travis <travis@sgi.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH -tip/cpus4096-v2] cpumask: fix cpumask of call_function_data
Date: Fri, 24 Oct 2008 22:15:17 +1100 [thread overview]
Message-ID: <200810242215.19440.rusty@rustcorp.com.au> (raw)
In-Reply-To: <49015358.9050308@ct.jp.nec.com>
On Friday 24 October 2008 15:47:20 Hiroshi Shimamoto wrote:
> From: Hiroshi Shimamoto <h-shimamoto@ct.jp.nec.com>
Ingo, because of these concerns I recommend you revert
d4de5ac3b5e70928c86e3e5ac311f16cbf2e9ab3 (cpumask: smp_call_function_many())
for now, and apply this less contentious version.
Subject: cpumask: smp_call_function_many()
From: Rusty Russell <rusty@rustcorp.com.au>
Transition from cpumask_t-taking smp_call_function_mask() to a new
smp_call_function_many() which takes a struct cpumask * instead.
(Naming is inspired by smp_call_function_single).
Unfortunately, converting the function implementation properly is
non-trivial, but what we care about is the API, so this simply wraps
it.
Note that the new one returns void: the old one couldn't fail either
unless there was a logic bug.
The old smp_call_function_mask() isn't marked __deprecated, because
sparc64 builds with -Werr in arch/sparc (thanks Stephen).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
diff -r cdd2da35b209 include/linux/smp.h
--- a/include/linux/smp.h Fri Oct 24 14:10:08 2008 +1100
+++ b/include/linux/smp.h Fri Oct 24 22:08:55 2008 +1100
@@ -64,8 +64,17 @@ extern void smp_cpus_done(unsigned int m
* Call a function on all other processors
*/
int smp_call_function(void(*func)(void *info), void *info, int wait);
+/* Deprecated: use smp_call_function_many() which uses a cpumask ptr. */
int smp_call_function_mask(cpumask_t mask, void(*func)(void *info), void *info,
int wait);
+
+static inline void smp_call_function_many(const struct cpumask *mask,
+ void (*func)(void *info), void *info,
+ int wait)
+{
+ smp_call_function_mask(*mask, func, info, wait);
+}
+
int smp_call_function_single(int cpuid, void (*func) (void *info), void *info,
int wait);
void __smp_call_function_single(int cpuid, struct call_single_data *data);
next prev parent reply other threads:[~2008-10-24 11:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-24 4:47 [PATCH -tip/cpus4096-v2] cpumask: fix cpumask of call_function_data Hiroshi Shimamoto
2008-10-24 11:05 ` Rusty Russell
2008-10-24 21:46 ` Hiroshi Shimamoto
2008-10-26 22:40 ` Rusty Russell
2008-10-30 17:44 ` Hiroshi Shimamoto
2008-10-24 11:15 ` Rusty Russell [this message]
2008-10-27 12:55 ` Ingo Molnar
2008-10-27 12:59 ` Ingo Molnar
2008-10-27 13:02 ` Ingo Molnar
2008-10-27 13:32 ` Ingo Molnar
2008-10-27 23:07 ` Hiroshi Shimamoto
2008-10-28 0:46 ` Rusty Russell
2008-10-27 22:21 ` 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=200810242215.19440.rusty@rustcorp.com.au \
--to=rusty@rustcorp.com.au \
--cc=h-shimamoto@ct.jp.nec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=travis@sgi.com \
/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