diff options
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 22 |
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 | ||
903 | static 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. */ |
904 | void __cpuinit sun4v_init_mondo_queues(void) | 922 | void __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. */ |