aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel/irq.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2006-02-08 19:41:20 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-03-20 04:12:02 -0500
commit1d2f1f90a1e004b0c1b8a73ed4394a93f09104b3 (patch)
tree2fcc0840b52218631020311d7b6d785e9a15db6a /arch/sparc64/kernel/irq.c
parent5b0c0572fcd6204675c5f7ddfa572b5017f817dd (diff)
[SPARC64]: Sun4v cross-call sending support.
Technically the hypervisor call supports sending in a list of all cpus to get the cross-call, but I only pass in one cpu at a time for now. The multi-cpu support is there, just ifdef'd out so it's easy to enable or delete it later. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r--arch/sparc64/kernel/irq.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index ff201c007e0c..c80d2531ec46 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -900,6 +900,24 @@ static void __cpuinit init_one_kbuf(unsigned long *pa_ptr)
900 *pa_ptr = __pa(page); 900 *pa_ptr = __pa(page);
901} 901}
902 902
903static void __cpuinit init_cpu_send_mondo_info(struct trap_per_cpu *tb)
904{
905#ifdef CONFIG_SMP
906 unsigned long page;
907
908 BUILD_BUG_ON((NR_CPUS * sizeof(u16)) > (PAGE_SIZE - 64));
909
910 page = get_zeroed_page(GFP_ATOMIC);
911 if (!page) {
912 prom_printf("SUN4V: Error, cannot allocate cpu mondo page.\n");
913 prom_halt();
914 }
915
916 tb->cpu_mondo_block_pa = __pa(page);
917 tb->cpu_list_pa = __pa(page + 64);
918#endif
919}
920
903/* Allocate and init the mondo and error queues for this cpu. */ 921/* Allocate and init the mondo and error queues for this cpu. */
904void __cpuinit sun4v_init_mondo_queues(void) 922void __cpuinit sun4v_init_mondo_queues(void)
905{ 923{
@@ -908,10 +926,14 @@ void __cpuinit sun4v_init_mondo_queues(void)
908 926
909 init_one_mondo(&tb->cpu_mondo_pa, HV_CPU_QUEUE_CPU_MONDO); 927 init_one_mondo(&tb->cpu_mondo_pa, HV_CPU_QUEUE_CPU_MONDO);
910 init_one_mondo(&tb->dev_mondo_pa, HV_CPU_QUEUE_DEVICE_MONDO); 928 init_one_mondo(&tb->dev_mondo_pa, HV_CPU_QUEUE_DEVICE_MONDO);
929
911 init_one_mondo(&tb->resum_mondo_pa, HV_CPU_QUEUE_RES_ERROR); 930 init_one_mondo(&tb->resum_mondo_pa, HV_CPU_QUEUE_RES_ERROR);
912 init_one_kbuf(&tb->resum_kernel_buf_pa); 931 init_one_kbuf(&tb->resum_kernel_buf_pa);
932
913 init_one_mondo(&tb->nonresum_mondo_pa, HV_CPU_QUEUE_NONRES_ERROR); 933 init_one_mondo(&tb->nonresum_mondo_pa, HV_CPU_QUEUE_NONRES_ERROR);
914 init_one_kbuf(&tb->nonresum_kernel_buf_pa); 934 init_one_kbuf(&tb->nonresum_kernel_buf_pa);
935
936 init_cpu_send_mondo_info(tb);
915} 937}
916 938
917/* Only invoked on boot processor. */ 939/* Only invoked on boot processor. */