Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dab5209cd878c146d9f6923f061d1c2725ff210f
Commit:     dab5209cd878c146d9f6923f061d1c2725ff210f
Parent:     7dc1da9ffae5a344f7115d019e2be069d3e1bb8d
Author:     Carsten Otte <[EMAIL PROTECTED]>
AuthorDate: Sat Jan 26 14:11:27 2008 +0100
Committer:  Martin Schwidefsky <[EMAIL PROTECTED]>
CommitDate: Sat Jan 26 14:11:31 2008 +0100

    [S390] add smp_call_function_mask
    
    This patch adds the s390 variant for smp_call_function_mask(). The
    implementation is pretty straight forward using the wrapper
    __smp_call_function_map() which already takes a cpumask_t argument.
    
    Signed-off-by: Carsten Otte <[EMAIL PROTECTED]>
    Signed-off-by: Martin Schwidefsky <[EMAIL PROTECTED]>
---
 arch/s390/kernel/smp.c |   27 +++++++++++++++++++++++++++
 include/asm-s390/smp.h |    2 ++
 2 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/arch/s390/kernel/smp.c b/arch/s390/kernel/smp.c
index 040406d..f66db71 100644
--- a/arch/s390/kernel/smp.c
+++ b/arch/s390/kernel/smp.c
@@ -210,6 +210,33 @@ int smp_call_function_single(int cpu, void (*func) (void 
*info), void *info,
 }
 EXPORT_SYMBOL(smp_call_function_single);
 
+/**
+ * smp_call_function_mask(): Run a function on a set of other CPUs.
+ * @mask: The set of cpus to run on.  Must not include the current cpu.
+ * @func: The function to run. This must be fast and non-blocking.
+ * @info: An arbitrary pointer to pass to the function.
+ * @wait: If true, wait (atomically) until function has completed on other 
CPUs.
+ *
+ * Returns 0 on success, else a negative status code.
+ *
+ * If @wait is true, then returns once @func has returned; otherwise
+ * it returns just before the target cpu calls @func.
+ *
+ * You must not call this function with disabled interrupts or from a
+ * hardware interrupt handler or from a bottom half handler.
+ */
+int
+smp_call_function_mask(cpumask_t mask,
+                       void (*func)(void *), void *info,
+                       int wait)
+{
+       preempt_disable();
+       __smp_call_function_map(func, info, 0, wait, mask);
+       preempt_enable();
+       return 0;
+}
+EXPORT_SYMBOL(smp_call_function_mask);
+
 void smp_send_stop(void)
 {
        int cpu, rc;
diff --git a/include/asm-s390/smp.h b/include/asm-s390/smp.h
index 218454b..c7b7432 100644
--- a/include/asm-s390/smp.h
+++ b/include/asm-s390/smp.h
@@ -90,6 +90,8 @@ extern void __cpu_die (unsigned int cpu);
 extern void cpu_die (void) __attribute__ ((noreturn));
 extern int __cpu_up (unsigned int cpu);
 
+extern int smp_call_function_mask(cpumask_t mask, void (*func)(void *),
+       void *info, int wait);
 #endif
 
 #ifndef CONFIG_SMP
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to