aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc64/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r--arch/sparc64/kernel/irq.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c
index 26cdf47981c3..5a92851296c0 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -64,7 +64,7 @@ struct ino_bucket {
64}; 64};
65 65
66#define NUM_IVECS (IMAP_INR + 1) 66#define NUM_IVECS (IMAP_INR + 1)
67struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (SMP_CACHE_BYTES))); 67struct ino_bucket *ivector_table;
68unsigned long ivector_table_pa; 68unsigned long ivector_table_pa;
69 69
70#define __irq_ino(irq) \ 70#define __irq_ino(irq) \
@@ -928,22 +928,22 @@ static struct irqaction timer_irq_action = {
928 .name = "timer", 928 .name = "timer",
929}; 929};
930 930
931/* XXX Belongs in a common location. XXX */
932static unsigned long kimage_addr_to_ra(void *p)
933{
934 unsigned long val = (unsigned long) p;
935
936 return kern_base + (val - KERNBASE);
937}
938
939/* Only invoked on boot processor. */ 931/* Only invoked on boot processor. */
940void __init init_IRQ(void) 932void __init init_IRQ(void)
941{ 933{
934 unsigned long size;
935
942 map_prom_timers(); 936 map_prom_timers();
943 kill_prom_timer(); 937 kill_prom_timer();
944 memset(&ivector_table[0], 0, sizeof(ivector_table));
945 938
946 ivector_table_pa = kimage_addr_to_ra(&ivector_table[0]); 939 size = sizeof(struct ino_bucket) * NUM_IVECS;
940 ivector_table = alloc_bootmem_low(size);
941 if (!ivector_table) {
942 prom_printf("Fatal error, cannot allocate ivector_table\n");
943 prom_halt();
944 }
945
946 ivector_table_pa = __pa(ivector_table);
947 947
948 if (tlb_type == hypervisor) 948 if (tlb_type == hypervisor)
949 sun4v_init_mondo_queues(); 949 sun4v_init_mondo_queues();