Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / frv / kernel / irq.c
index 8c524cd..11fa326 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
+#include <linux/module.h>
 
 #include <asm/atomic.h>
 #include <asm/io.h>
@@ -74,9 +75,8 @@ int show_interrupts(struct seq_file *p, void *v)
        switch (i) {
        case 0:
                seq_printf(p, "           ");
-               for (j = 0; j < NR_CPUS; j++)
-                       if (cpu_online(j))
-                               seq_printf(p, "CPU%d       ",j);
+               for_each_online_cpu(j)
+                       seq_printf(p, "CPU%d       ",j);
 
                seq_putc(p, '\n');
                break;
@@ -99,9 +99,8 @@ int show_interrupts(struct seq_file *p, void *v)
 #ifndef CONFIG_SMP
                seq_printf(p, "%10u ", kstat_irqs(i));
 #else
-               for (j = 0; j < NR_CPUS; j++)
-                       if (cpu_online(j))
-                               seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]);
+               for_each_online_cpu(j)
+                       seq_printf(p, "%10u ", kstat_cpu(j).irqs[i - 1]);
 #endif
 
                level = group->sources[ix]->level - frv_irq_levels;
@@ -178,6 +177,8 @@ void disable_irq_nosync(unsigned int irq)
        spin_unlock_irqrestore(&level->lock, flags);
 }
 
+EXPORT_SYMBOL(disable_irq_nosync);
+
 /**
  *     disable_irq - disable an irq and wait for completion
  *     @irq: Interrupt to disable
@@ -204,6 +205,8 @@ void disable_irq(unsigned int irq)
 #endif
 }
 
+EXPORT_SYMBOL(disable_irq);
+
 /**
  *     enable_irq - enable handling of an irq
  *     @irq: Interrupt to enable
@@ -268,6 +271,8 @@ void enable_irq(unsigned int irq)
        spin_unlock_irqrestore(&level->lock, flags);
 }
 
+EXPORT_SYMBOL(enable_irq);
+
 /*****************************************************************************/
 /*
  * handles all normal device IRQ's
@@ -280,18 +285,11 @@ asmlinkage void do_IRQ(void)
        struct irq_source *source;
        int level, cpu;
 
+       irq_enter();
+
        level = (__frame->tbr >> 4) & 0xf;
        cpu = smp_processor_id();
 
-#if 0
-       {
-               static u32 irqcount;
-               *(volatile u32 *) 0xe1200004 = ~((irqcount++ << 8) | level);
-               *(volatile u16 *) 0xffc00100 = (u16) ~0x9999;
-               mb();
-       }
-#endif
-
        if ((unsigned long) __frame - (unsigned long) (current + 1) < 512)
                BUG();
 
@@ -301,40 +299,12 @@ asmlinkage void do_IRQ(void)
 
        kstat_this_cpu.irqs[level]++;
 
-       irq_enter();
-
        for (source = frv_irq_levels[level].sources; source; source = source->next)
                source->doirq(source);
 
-       irq_exit();
-
        __clr_MASK(level);
 
-       /* only process softirqs if we didn't interrupt another interrupt handler */
-       if ((__frame->psr & PSR_PIL) == PSR_PIL_0)
-               if (local_softirq_pending())
-                       do_softirq();
-
-#ifdef CONFIG_PREEMPT
-       local_irq_disable();
-       while (--current->preempt_count == 0) {
-               if (!(__frame->psr & PSR_S) ||
-                   current->need_resched == 0 ||
-                   in_interrupt())
-                       break;
-               current->preempt_count++;
-               local_irq_enable();
-               preempt_schedule();
-               local_irq_disable();
-       }
-#endif
-
-#if 0
-       {
-               *(volatile u16 *) 0xffc00100 = (u16) ~0x6666;
-               mb();
-       }
-#endif
+       irq_exit();
 
 } /* end do_IRQ() */
 
@@ -425,6 +395,8 @@ int request_irq(unsigned int irq,
        return retval;
 }
 
+EXPORT_SYMBOL(request_irq);
+
 /**
  *     free_irq - free an interrupt
  *     @irq: Interrupt line to free
@@ -496,6 +468,8 @@ void free_irq(unsigned int irq, void *dev_id)
        }
 }
 
+EXPORT_SYMBOL(free_irq);
+
 /*
  * IRQ autodetection code..
  *
@@ -519,6 +493,8 @@ unsigned long probe_irq_on(void)
        return 0;
 }
 
+EXPORT_SYMBOL(probe_irq_on);
+
 /*
  * Return a mask of triggered interrupts (this
  * can handle only legacy ISA interrupts).
@@ -542,6 +518,8 @@ unsigned int probe_irq_mask(unsigned long xmask)
        return 0;
 }
 
+EXPORT_SYMBOL(probe_irq_mask);
+
 /*
  * Return the one interrupt that triggered (this can
  * handle any interrupt source).
@@ -571,6 +549,8 @@ int probe_irq_off(unsigned long xmask)
        return -1;
 }
 
+EXPORT_SYMBOL(probe_irq_off);
+
 /* this was setup_x86_irq but it seems pretty generic */
 int setup_irq(unsigned int irq, struct irqaction *new)
 {