diff options
Diffstat (limited to 'arch/sparc64/kernel/irq.c')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 30 |
1 files changed, 19 insertions, 11 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index 6eb44ca5dba6..bb0bb34555da 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -1018,21 +1018,29 @@ static void __cpuinit init_cpu_send_mondo_info(struct trap_per_cpu *tb, int use_ | |||
1018 | } | 1018 | } |
1019 | 1019 | ||
1020 | /* Allocate and register the mondo and error queues for this cpu. */ | 1020 | /* Allocate and register the mondo and error queues for this cpu. */ |
1021 | void __cpuinit sun4v_init_mondo_queues(int use_bootmem) | 1021 | void __cpuinit sun4v_init_mondo_queues(int use_bootmem, int cpu, int alloc, int load) |
1022 | { | 1022 | { |
1023 | int cpu = hard_smp_processor_id(); | ||
1024 | struct trap_per_cpu *tb = &trap_block[cpu]; | 1023 | struct trap_per_cpu *tb = &trap_block[cpu]; |
1025 | 1024 | ||
1026 | alloc_one_mondo(&tb->cpu_mondo_pa, use_bootmem); | 1025 | if (alloc) { |
1027 | alloc_one_mondo(&tb->dev_mondo_pa, use_bootmem); | 1026 | alloc_one_mondo(&tb->cpu_mondo_pa, use_bootmem); |
1028 | alloc_one_mondo(&tb->resum_mondo_pa, use_bootmem); | 1027 | alloc_one_mondo(&tb->dev_mondo_pa, use_bootmem); |
1029 | alloc_one_kbuf(&tb->resum_kernel_buf_pa, use_bootmem); | 1028 | alloc_one_mondo(&tb->resum_mondo_pa, use_bootmem); |
1030 | alloc_one_mondo(&tb->nonresum_mondo_pa, use_bootmem); | 1029 | alloc_one_kbuf(&tb->resum_kernel_buf_pa, use_bootmem); |
1031 | alloc_one_kbuf(&tb->nonresum_kernel_buf_pa, use_bootmem); | 1030 | alloc_one_mondo(&tb->nonresum_mondo_pa, use_bootmem); |
1031 | alloc_one_kbuf(&tb->nonresum_kernel_buf_pa, use_bootmem); | ||
1032 | 1032 | ||
1033 | init_cpu_send_mondo_info(tb, use_bootmem); | 1033 | init_cpu_send_mondo_info(tb, use_bootmem); |
1034 | } | ||
1034 | 1035 | ||
1035 | sun4v_register_mondo_queues(cpu); | 1036 | if (load) { |
1037 | if (cpu != hard_smp_processor_id()) { | ||
1038 | prom_printf("SUN4V: init mondo on cpu %d not %d\n", | ||
1039 | cpu, hard_smp_processor_id()); | ||
1040 | prom_halt(); | ||
1041 | } | ||
1042 | sun4v_register_mondo_queues(cpu); | ||
1043 | } | ||
1036 | } | 1044 | } |
1037 | 1045 | ||
1038 | /* Only invoked on boot processor. */ | 1046 | /* Only invoked on boot processor. */ |
@@ -1043,7 +1051,7 @@ void __init init_IRQ(void) | |||
1043 | memset(&ivector_table[0], 0, sizeof(ivector_table)); | 1051 | memset(&ivector_table[0], 0, sizeof(ivector_table)); |
1044 | 1052 | ||
1045 | if (tlb_type == hypervisor) | 1053 | if (tlb_type == hypervisor) |
1046 | sun4v_init_mondo_queues(1); | 1054 | sun4v_init_mondo_queues(1, hard_smp_processor_id(), 1, 1); |
1047 | 1055 | ||
1048 | /* We need to clear any IRQ's pending in the soft interrupt | 1056 | /* We need to clear any IRQ's pending in the soft interrupt |
1049 | * registers, a spurious one could be left around from the | 1057 | * registers, a spurious one could be left around from the |