sh: rework register restore code for sh3/sh4/sh4a
[safe/jmp/linux-2.6] / arch / sh / kernel / irq.c
index 27b923c..64b7690 100644 (file)
 #include <linux/module.h>
 #include <linux/kernel_stat.h>
 #include <linux/seq_file.h>
-#include <linux/irq.h>
 #include <asm/processor.h>
 #include <asm/machvec.h>
 #include <asm/uaccess.h>
 #include <asm/thread_info.h>
-#include <asm/cpu/mmu_context.h>
+#include <cpu/mmu_context.h>
 
 atomic_t irq_err_count;
 
@@ -69,7 +68,7 @@ unlock:
 }
 #endif
 
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
 /*
  * per-CPU IRQ handling contexts (thread information and stack)
  */
@@ -85,7 +84,7 @@ static union irq_ctx *softirq_ctx[NR_CPUS] __read_mostly;
 asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
        union irq_ctx *curctx, *irqctx;
 #endif
 
@@ -109,7 +108,7 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
 
        irq = irq_demux(evt2irq(irq));
 
-#ifdef CONFIG_4KSTACKS
+#ifdef CONFIG_IRQSTACKS
        curctx = (union irq_ctx *)current_thread_info();
        irqctx = hardirq_ctx[smp_processor_id()];
 
@@ -157,16 +156,12 @@ asmlinkage int do_IRQ(unsigned int irq, struct pt_regs *regs)
        return 1;
 }
 
-#ifdef CONFIG_4KSTACKS
-/*
- * These should really be __section__(".bss.page_aligned") as well, but
- * gcc's 3.0 and earlier don't handle that correctly.
- */
+#ifdef CONFIG_IRQSTACKS
 static char softirq_stack[NR_CPUS * THREAD_SIZE]
-               __attribute__((__aligned__(THREAD_SIZE)));
+               __attribute__((__section__(".bss.page_aligned")));
 
 static char hardirq_stack[NR_CPUS * THREAD_SIZE]
-               __attribute__((__aligned__(THREAD_SIZE)));
+               __attribute__((__section__(".bss.page_aligned")));
 
 /*
  * allocate per-cpu stacks for hardirq and for softirq processing
@@ -205,8 +200,6 @@ void irq_ctx_exit(int cpu)
        hardirq_ctx[cpu] = NULL;
 }
 
-extern asmlinkage void __do_softirq(void);
-
 asmlinkage void do_softirq(void)
 {
        unsigned long flags;
@@ -249,22 +242,11 @@ asmlinkage void do_softirq(void)
 
        local_irq_restore(flags);
 }
-EXPORT_SYMBOL(do_softirq);
 #endif
 
 void __init init_IRQ(void)
 {
-#ifdef CONFIG_CPU_HAS_PINT_IRQ
-       init_IRQ_pint();
-#endif
-
-#ifdef CONFIG_CPU_HAS_INTC2_IRQ
-       init_IRQ_intc2();
-#endif
-
-#ifdef CONFIG_CPU_HAS_IPR_IRQ
-       init_IRQ_ipr();
-#endif
+       plat_irq_setup();
 
        /* Perform the machine specific initialisation */
        if (sh_mv.mv_init_irq)