diff options
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 { | |||
244 | static DEFINE_SPINLOCK(cross_call_lock); | 244 | static DEFINE_SPINLOCK(cross_call_lock); |
245 | 245 | ||
246 | /* Cross calls must be serialized, at least currently. */ | 246 | /* Cross calls must be serialized, at least currently. */ |
247 | static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | 247 | static void smp4m_cross_call(smpfunc_t func, cpumask_t mask, unsigned long arg1, |
248 | unsigned long arg2, unsigned long arg3, | 248 | unsigned long arg2, unsigned long arg3, |
249 | unsigned long arg4, unsigned long arg5) | 249 | unsigned long arg4) |
250 | { | 250 | { |
251 | register int ncpus = SUN4M_NCPUS; | 251 | register int ncpus = SUN4M_NCPUS; |
252 | unsigned long flags; | 252 | unsigned long flags; |
@@ -259,14 +259,14 @@ static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | |||
259 | ccall_info.arg2 = arg2; | 259 | ccall_info.arg2 = arg2; |
260 | ccall_info.arg3 = arg3; | 260 | ccall_info.arg3 = arg3; |
261 | ccall_info.arg4 = arg4; | 261 | ccall_info.arg4 = arg4; |
262 | ccall_info.arg5 = arg5; | 262 | ccall_info.arg5 = 0; |
263 | 263 | ||
264 | /* Init receive/complete mapping, plus fire the IPI's off. */ | 264 | /* Init receive/complete mapping, plus fire the IPI's off. */ |
265 | { | 265 | { |
266 | cpumask_t mask = cpu_online_map; | ||
267 | register int i; | 266 | register int i; |
268 | 267 | ||
269 | cpu_clear(smp_processor_id(), mask); | 268 | cpu_clear(smp_processor_id(), mask); |
269 | cpus_and(mask, cpu_online_map, mask); | ||
270 | for(i = 0; i < ncpus; i++) { | 270 | for(i = 0; i < ncpus; i++) { |
271 | if (cpu_isset(i, mask)) { | 271 | if (cpu_isset(i, mask)) { |
272 | ccall_info.processors_in[i] = 0; | 272 | ccall_info.processors_in[i] = 0; |
@@ -284,12 +284,16 @@ static void smp4m_cross_call(smpfunc_t func, unsigned long arg1, | |||
284 | 284 | ||
285 | i = 0; | 285 | i = 0; |
286 | do { | 286 | do { |
287 | if (!cpu_isset(i, mask)) | ||
288 | continue; | ||
287 | while(!ccall_info.processors_in[i]) | 289 | while(!ccall_info.processors_in[i]) |
288 | barrier(); | 290 | barrier(); |
289 | } while(++i < ncpus); | 291 | } while(++i < ncpus); |
290 | 292 | ||
291 | i = 0; | 293 | i = 0; |
292 | do { | 294 | do { |
295 | if (!cpu_isset(i, mask)) | ||
296 | continue; | ||
293 | while(!ccall_info.processors_out[i]) | 297 | while(!ccall_info.processors_out[i]) |
294 | barrier(); | 298 | barrier(); |
295 | } while(++i < ncpus); | 299 | } while(++i < ncpus); |