Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10397e4069bbcc8219537e7c1e0d6a6935432156
Commit:     10397e4069bbcc8219537e7c1e0d6a6935432156
Parent:     eb2d8d60327bec172ec80efbda94d0c492088204
Author:     David S. Miller <[EMAIL PROTECTED]>
AuthorDate: Sat Oct 13 21:43:31 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Sat Oct 13 21:53:16 2007 -0700

    [SPARC64]: Allocate ivector_table dynamically.
    
    Shrinks kernel by 16K compared to before the IVEC physical
    address changes.
    
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 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 26cdf47..5a92851 100644
--- a/arch/sparc64/kernel/irq.c
+++ b/arch/sparc64/kernel/irq.c
@@ -64,7 +64,7 @@ struct ino_bucket {
 };
 
 #define NUM_IVECS      (IMAP_INR + 1)
-struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned 
(SMP_CACHE_BYTES)));
+struct ino_bucket *ivector_table;
 unsigned long ivector_table_pa;
 
 #define __irq_ino(irq) \
@@ -928,22 +928,22 @@ static struct irqaction timer_irq_action = {
        .name = "timer",
 };
 
-/* XXX Belongs in a common location. XXX */
-static unsigned long kimage_addr_to_ra(void *p)
-{
-       unsigned long val = (unsigned long) p;
-
-       return kern_base + (val - KERNBASE);
-}
-
 /* Only invoked on boot processor. */
 void __init init_IRQ(void)
 {
+       unsigned long size;
+
        map_prom_timers();
        kill_prom_timer();
-       memset(&ivector_table[0], 0, sizeof(ivector_table));
 
-       ivector_table_pa = kimage_addr_to_ra(&ivector_table[0]);
+       size = sizeof(struct ino_bucket) * NUM_IVECS;
+       ivector_table = alloc_bootmem_low(size);
+       if (!ivector_table) {
+               prom_printf("Fatal error, cannot allocate ivector_table\n");
+               prom_halt();
+       }
+
+       ivector_table_pa = __pa(ivector_table);
 
        if (tlb_type == hypervisor)
                sun4v_init_mondo_queues();
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to