aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel/sun4d_smp.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-09-08 18:39:30 -0400
committerDavid S. Miller <davem@davemloft.net>2008-09-08 18:39:30 -0400
commit98d86c091534f35c4bab294451ae6bccab8e9075 (patch)
tree98c9f0b80bb078405cf173f1d5cc91c72e77082d /arch/sparc/kernel/sun4d_smp.c
parentd875a4b0ffad754e6d89fa561ea7dcdd79c9508b (diff)
parent4d084617fb0d025c42c242362d1f27d337e2d407 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts: arch/sparc/kernel/of_device.c
Diffstat (limited to 'arch/sparc/kernel/sun4d_smp.c')
-rw-r--r--arch/sparc/kernel/sun4d_smp.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index bf7147a9308e..72fa8daab60b 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -261,8 +261,9 @@ static struct smp_funcall {
261static DEFINE_SPINLOCK(cross_call_lock); 261static DEFINE_SPINLOCK(cross_call_lock);
262 262
263/* Cross calls must be serialized, at least currently. */ 263/* Cross calls must be serialized, at least currently. */
264void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2, 264static void smp4d_cross_call(smpfunc_t func, cpumask_t mask, unsigned long arg1,
265 unsigned long arg3, unsigned long arg4, unsigned long arg5) 265 unsigned long arg2, unsigned long arg3,
266 unsigned long arg4)
266{ 267{
267 if(smp_processors_ready) { 268 if(smp_processors_ready) {
268 register int high = smp_highest_cpu; 269 register int high = smp_highest_cpu;
@@ -277,7 +278,7 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
277 register unsigned long a2 asm("i2") = arg2; 278 register unsigned long a2 asm("i2") = arg2;
278 register unsigned long a3 asm("i3") = arg3; 279 register unsigned long a3 asm("i3") = arg3;
279 register unsigned long a4 asm("i4") = arg4; 280 register unsigned long a4 asm("i4") = arg4;
280 register unsigned long a5 asm("i5") = arg5; 281 register unsigned long a5 asm("i5") = 0;
281 282
282 __asm__ __volatile__( 283 __asm__ __volatile__(
283 "std %0, [%6]\n\t" 284 "std %0, [%6]\n\t"
@@ -289,11 +290,10 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
289 290
290 /* Init receive/complete mapping, plus fire the IPI's off. */ 291 /* Init receive/complete mapping, plus fire the IPI's off. */
291 { 292 {
292 cpumask_t mask;
293 register int i; 293 register int i;
294 294
295 mask = cpumask_of_cpu(hard_smp4d_processor_id()); 295 cpu_clear(smp_processor_id(), mask);
296 cpus_andnot(mask, cpu_online_map, mask); 296 cpus_and(mask, cpu_online_map, mask);
297 for(i = 0; i <= high; i++) { 297 for(i = 0; i <= high; i++) {
298 if (cpu_isset(i, mask)) { 298 if (cpu_isset(i, mask)) {
299 ccall_info.processors_in[i] = 0; 299 ccall_info.processors_in[i] = 0;
@@ -308,12 +308,16 @@ void smp4d_cross_call(smpfunc_t func, unsigned long arg1, unsigned long arg2,
308 308
309 i = 0; 309 i = 0;
310 do { 310 do {
311 if (!cpu_isset(i, mask))
312 continue;
311 while(!ccall_info.processors_in[i]) 313 while(!ccall_info.processors_in[i])
312 barrier(); 314 barrier();
313 } while(++i <= high); 315 } while(++i <= high);
314 316
315 i = 0; 317 i = 0;
316 do { 318 do {
319 if (!cpu_isset(i, mask))
320 continue;
317 while(!ccall_info.processors_out[i]) 321 while(!ccall_info.processors_out[i])
318 barrier(); 322 barrier();
319 } while(++i <= high); 323 } while(++i <= high);