diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-27 20:03:22 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-27 20:03:22 -0700 |
commit | 66e4f8c076f8803e83879d986a7803a918b2129e (patch) | |
tree | 8d32c210b0c2304a55c9333e71a76d43755a4ab3 /arch/sparc/kernel/sun4m_smp.c | |
parent | 349101da8e1f8e5eb1476b02823da80495224485 (diff) | |
download | linux-66e4f8c076f8803e83879d986a7803a918b2129e.tar.bz2 |
sparc32: Implement smp_call_function_single().
Reported by Stephen Rothwell.
Needed to fix the build when CONFIG_RELAY is enabled.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/sun4m_smp.c')
-rw-r--r-- | arch/sparc/kernel/sun4m_smp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/sparc/kernel/sun4m_smp.c b/arch/sparc/kernel/sun4m_smp.c index 406ac1abc83a..a14a76ac7f36 100644 --- a/arch/sparc/kernel/sun4m_smp.c +++ b/arch/sparc/kernel/sun4m_smp.c @@ -244,9 +244,9 @@ static struct smp_funcall { static DEFINE_SPINLOCK(cross_call_lock); /* Cross calls must be serialized, at least currently. */ -static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, +static void smp4m_cross_call(smpfunc_t func, cpumask_t mask, unsigned long arg1, unsigned long arg2, unsigned long arg3, - unsigned long arg4, unsigned long arg5) + unsigned long arg4) { register int ncpus = SUN4M_NCPUS; unsigned long flags; @@ -259,14 +259,14 @@ static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, ccall_info.arg2 = arg2; ccall_info.arg3 = arg3; ccall_info.arg4 = arg4; - ccall_info.arg5 = arg5; + ccall_info.arg5 = 0; /* Init receive/complete mapping, plus fire the IPI's off. */ { - cpumask_t mask = cpu_online_map; register int i; cpu_clear(smp_processor_id(), mask); + cpus_and(mask, cpu_online_map, mask); for(i = 0; i < ncpus; i++) { if (cpu_isset(i, mask)) { ccall_info.processors_in[i] = 0; @@ -284,12 +284,16 @@ static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, i = 0; do { + if (!cpu_isset(i, mask)) + continue; while(!ccall_info.processors_in[i]) barrier(); } while(++i < ncpus); i = 0; do { + if (!cpu_isset(i, mask)) + continue; while(!ccall_info.processors_out[i]) barrier(); } while(++i < ncpus); |