diff options
author | David S. Miller <davem@davemloft.net> | 2006-02-21 16:59:47 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-03-20 04:13:49 -0500 |
commit | d371c0c17466b7e7bb4d395f96aa885a23df1073 (patch) | |
tree | c4705a6b3fa5e58d7003c82395746434c089d6ee /arch | |
parent | c79f76777d678ba454aa727800e1386a1fd1f2e8 (diff) |
[SPARC64]: Pass multiple CPUs at once to hypervisor cross-call API.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sparc64/kernel/smp.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/arch/sparc64/kernel/smp.c b/arch/sparc64/kernel/smp.c index b586345fe3b9..356d423ae14d 100644 --- a/arch/sparc64/kernel/smp.c +++ b/arch/sparc64/kernel/smp.c | |||
@@ -557,7 +557,6 @@ retry: | |||
557 | } | 557 | } |
558 | } | 558 | } |
559 | 559 | ||
560 | #if 0 | ||
561 | /* Multi-cpu list version. */ | 560 | /* Multi-cpu list version. */ |
562 | static int init_cpu_list(u16 *list, cpumask_t mask) | 561 | static int init_cpu_list(u16 *list, cpumask_t mask) |
563 | { | 562 | { |
@@ -631,59 +630,6 @@ static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t | |||
631 | 630 | ||
632 | put_cpu(); | 631 | put_cpu(); |
633 | } | 632 | } |
634 | #else | ||
635 | /* Single-cpu list version. */ | ||
636 | static void hypervisor_xcall_deliver(u64 data0, u64 data1, u64 data2, cpumask_t mask) | ||
637 | { | ||
638 | int this_cpu = get_cpu(); | ||
639 | struct trap_per_cpu *tb = &trap_block[this_cpu]; | ||
640 | u64 *mondo = __va(tb->cpu_mondo_block_pa); | ||
641 | u16 *cpu_list = __va(tb->cpu_list_pa); | ||
642 | int i; | ||
643 | |||
644 | mondo[0] = data0; | ||
645 | mondo[1] = data1; | ||
646 | mondo[2] = data2; | ||
647 | wmb(); | ||
648 | |||
649 | for_each_cpu_mask(i, mask) { | ||
650 | int retries = 0; | ||
651 | |||
652 | do { | ||
653 | register unsigned long func __asm__("%o5"); | ||
654 | register unsigned long arg0 __asm__("%o0"); | ||
655 | register unsigned long arg1 __asm__("%o1"); | ||
656 | register unsigned long arg2 __asm__("%o2"); | ||
657 | |||
658 | cpu_list[0] = i; | ||
659 | func = HV_FAST_CPU_MONDO_SEND; | ||
660 | arg0 = 1; | ||
661 | arg1 = tb->cpu_list_pa; | ||
662 | arg2 = tb->cpu_mondo_block_pa; | ||
663 | |||
664 | __asm__ __volatile__("ta %8" | ||
665 | : "=&r" (func), "=&r" (arg0), | ||
666 | "=&r" (arg1), "=&r" (arg2) | ||
667 | : "0" (func), "1" (arg0), | ||
668 | "2" (arg1), "3" (arg2), | ||
669 | "i" (HV_FAST_TRAP) | ||
670 | : "memory"); | ||
671 | if (likely(arg0 == HV_EOK)) | ||
672 | break; | ||
673 | |||
674 | if (unlikely(++retries > 100)) { | ||
675 | printk("CPU[%d]: sun4v mondo error %lu\n", | ||
676 | this_cpu, func); | ||
677 | break; | ||
678 | } | ||
679 | |||
680 | udelay(2 * i); | ||
681 | } while (1); | ||
682 | } | ||
683 | |||
684 | put_cpu(); | ||
685 | } | ||
686 | #endif | ||
687 | 633 | ||
688 | /* Send cross call to all processors mentioned in MASK | 634 | /* Send cross call to all processors mentioned in MASK |
689 | * except self. | 635 | * except self. |