diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-10-14 00:43:31 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-10-14 00:53:16 -0400 |
commit | 10397e4069bbcc8219537e7c1e0d6a6935432156 (patch) | |
tree | cd92061bc5d02330386f4c3ade843c3ac1149dc8 /arch/sparc64 | |
parent | eb2d8d60327bec172ec80efbda94d0c492088204 (diff) |
[SPARC64]: Allocate ivector_table dynamically.
Shrinks kernel by 16K compared to before the IVEC physical
address changes.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64')
-rw-r--r-- | arch/sparc64/kernel/irq.c | 22 |
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) |
67 | struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (SMP_CACHE_BYTES))); | 67 | struct ino_bucket *ivector_table; |
68 | unsigned long ivector_table_pa; | 68 | unsigned 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 */ | ||
932 | static 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. */ |
940 | void __init init_IRQ(void) | 932 | void __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(); |