Merge branch 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm
authorLinus Torvalds <torvalds@g5.osdl.org>
Sun, 2 Jul 2006 22:07:45 +0000 (15:07 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sun, 2 Jul 2006 22:07:45 +0000 (15:07 -0700)
* 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm: (24 commits)
  [ARM] 3683/2:  ARM: Convert at91rm9200 to generic irq handling
  [ARM] 3682/2:  ARM: Convert ixp4xx to generic irq handling
  [ARM] 3702/1: ARM: Convert ixp23xx to generic irq handling
  [ARM] 3701/1: ARM: Convert plat-omap to generic irq handling
  [ARM] 3700/1: ARM: Convert lh7a40x to generic irq handling
  [ARM] 3699/1: ARM: Convert s3c2410 to generic irq handling
  [ARM] 3698/1: ARM: Convert sa1100 to generic irq handling
  [ARM] 3697/1: ARM: Convert shark to generic irq handling
  [ARM] 3696/1: ARM: Convert clps711x to generic irq handling
  [ARM] 3694/1: ARM: Convert ecard driver to generic irq handling
  [ARM] 3693/1: ARM: Convert omap1 to generic irq handling
  [ARM] 3691/1: ARM: Convert imx to generic irq handling
  [ARM] 3688/1: ARM: Convert clps7500 to generic irq handling
  [ARM] 3687/1: ARM: Convert integrator to generic irq handling
  [ARM] 3685/1: ARM: Convert pxa to generic irq handling
  [ARM] 3684/1: ARM: Convert l7200 to generic irq handling
  [ARM] 3681/1: ARM: Convert ixp2000 to generic irq handling
  [ARM] 3680/1: ARM: Convert footbridge to generic irq handling
  [ARM] 3695/1: ARM drivers/pcmcia: Fixup includes
  [ARM] 3689/1: ARM drivers/input/touchscreen: Fixup includes
  ...

Manual conflict resolved in kernel/irq/handle.c (butt-ugly ARM tickless
code).

51 files changed:
arch/arm/Kconfig
arch/arm/common/gic.c
arch/arm/common/sa1111.c
arch/arm/common/time-acorn.c
arch/arm/kernel/ecard.c
arch/arm/kernel/fiq.c
arch/arm/kernel/irq.c
arch/arm/mach-at91rm9200/at91rm9200_time.c
arch/arm/mach-at91rm9200/gpio.c
arch/arm/mach-clps711x/time.c
arch/arm/mach-clps7500/core.c
arch/arm/mach-footbridge/dc21285-timer.c
arch/arm/mach-footbridge/isa-timer.c
arch/arm/mach-imx/time.c
arch/arm/mach-integrator/core.c
arch/arm/mach-ixp2000/core.c
arch/arm/mach-ixp2000/ixdp2x00.c
arch/arm/mach-ixp2000/ixdp2x01.c
arch/arm/mach-ixp23xx/core.c
arch/arm/mach-ixp23xx/ixdp2351.c
arch/arm/mach-ixp4xx/coyote-pci.c
arch/arm/mach-ixp4xx/ixdp425-pci.c
arch/arm/mach-ixp4xx/ixdpg425-pci.c
arch/arm/mach-ixp4xx/nas100d-pci.c
arch/arm/mach-ixp4xx/nas100d-power.c
arch/arm/mach-l7200/core.c
arch/arm/mach-lh7a40x/arch-lpd7a40x.c
arch/arm/mach-lh7a40x/time.c
arch/arm/mach-omap1/board-osk.c
arch/arm/mach-omap1/serial.c
arch/arm/mach-pxa/idp.c
arch/arm/mach-pxa/sharpsl_pm.c
arch/arm/mach-s3c2410/bast-irq.c
arch/arm/mach-s3c2410/time.c
arch/arm/mach-sa1100/cerf.c
arch/arm/mach-sa1100/h3600.c
arch/arm/mach-sa1100/irq.c
arch/arm/mach-sa1100/pleb.c
arch/arm/mach-sa1100/time.c
arch/arm/mach-shark/core.c
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/gpio.c
drivers/input/touchscreen/corgi_ts.c
drivers/pcmcia/soc_common.c
include/asm-arm/dyntick.h [new file with mode: 0644]
include/asm-arm/hw_irq.h [new file with mode: 0644]
include/asm-arm/irq.h
include/asm-arm/mach/irq.h
include/linux/irq.h
kernel/irq/chip.c
kernel/irq/handle.c

index 919d8b92aaa4b072820c0148c4ebb5dd10fe520f..f81a62380addefde7db4f0cde3902cb872c1c061 100644 (file)
@@ -47,6 +47,18 @@ config MCA
          <file:Documentation/mca.txt> (and especially the web page given
          there) before attempting to build an MCA bus kernel.
 
+config GENERIC_HARDIRQS
+       bool
+       default y
+
+config HARDIRQS_SW_RESEND
+       bool
+       default y
+
+config GENERIC_IRQ_PROBE
+       bool
+       default y
+
 config RWSEM_GENERIC_SPINLOCK
        bool
        default y
index c02dc8116a18ef5facc08dbf61655c0144cfdaec..f3c1ebfdd0aabaa8ec8cc87d089f9fe74ce1899f 100644 (file)
@@ -33,6 +33,7 @@
 
 static void __iomem *gic_dist_base;
 static void __iomem *gic_cpu_base;
+static DEFINE_SPINLOCK(irq_controller_lock);
 
 /*
  * Routines to acknowledge, disable and enable interrupts
@@ -52,32 +53,45 @@ static void __iomem *gic_cpu_base;
 static void gic_ack_irq(unsigned int irq)
 {
        u32 mask = 1 << (irq % 32);
+
+       spin_lock(&irq_controller_lock);
        writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);
        writel(irq, gic_cpu_base + GIC_CPU_EOI);
+       spin_unlock(&irq_controller_lock);
 }
 
 static void gic_mask_irq(unsigned int irq)
 {
        u32 mask = 1 << (irq % 32);
+
+       spin_lock(&irq_controller_lock);
        writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);
+       spin_unlock(&irq_controller_lock);
 }
 
 static void gic_unmask_irq(unsigned int irq)
 {
        u32 mask = 1 << (irq % 32);
+
+       spin_lock(&irq_controller_lock);
        writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4);
+       spin_unlock(&irq_controller_lock);
 }
 
 #ifdef CONFIG_SMP
-static void gic_set_cpu(struct irqdesc *desc, unsigned int irq, unsigned int cpu)
+static void gic_set_cpu(unsigned int irq, cpumask_t mask_val)
 {
        void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3);
        unsigned int shift = (irq % 4) * 8;
+       unsigned int cpu = first_cpu(mask_val);
        u32 val;
 
+       spin_lock(&irq_controller_lock);
+       irq_desc[irq].cpu = cpu;
        val = readl(reg) & ~(0xff << shift);
        val |= 1 << (cpu + shift);
        writel(val, reg);
+       spin_unlock(&irq_controller_lock);
 }
 #endif
 
@@ -86,7 +100,7 @@ static struct irqchip gic_chip = {
        .mask           = gic_mask_irq,
        .unmask         = gic_unmask_irq,
 #ifdef CONFIG_SMP
-       .set_cpu        = gic_set_cpu,
+       .set_affinity   = gic_set_cpu,
 #endif
 };
 
index fe06a36a21302a73cf1d5cd89a2056fc4f8d9fcc..1cdb26a47e1f3170596b373fb401714d7d574772 100644 (file)
@@ -150,7 +150,7 @@ static void
 sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
 {
        unsigned int stat0, stat1, i;
-       void __iomem *base = desc->data;
+       void __iomem *base = get_irq_data(irq);
 
        stat0 = sa1111_readl(base + SA1111_INTSTATCLR0);
        stat1 = sa1111_readl(base + SA1111_INTSTATCLR1);
@@ -168,11 +168,11 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
 
        for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1)
                if (stat0 & 1)
-                       do_edge_IRQ(i, irq_desc + i, regs);
+                       handle_edge_irq(i, irq_desc + i, regs);
 
        for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1)
                if (stat1 & 1)
-                       do_edge_IRQ(i, irq_desc + i, regs);
+                       handle_edge_irq(i, irq_desc + i, regs);
 
        /* For level-based interrupts */
        desc->chip->unmask(irq);
index 486add853fb88fcaf515afd2e7fc6cb1efbaac13..31b65e2231d9d76e384763d7323ff3c958d5546d 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/timex.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
index 68a257666d953f62be9065db871f2476f9c9502d..ab4ad9562eee8f08ee9047102d052f6238f6d01e 100644 (file)
@@ -619,7 +619,7 @@ ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg
                ecard_t *ec = slot_to_ecard(slot);
 
                if (ec->claimed) {
-                       struct irqdesc *d = irqdesc + ec->irq;
+                       struct irq_desc *d = irq_desc + ec->irq;
                        /*
                         * this ugly code is so that we can operate a
                         * prioritorising system:
index 1ec3f7faa259eedba5ccf3973ca827fb869cdfcd..e8e90346f11c10702857a04adeb4fd2f935e1336 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
 #include <linux/seq_file.h>
 
 #include <asm/cacheflush.h>
index 4d31cf8d02d57aa55988757c91d31a93a295086d..c3d4e94ef5bf1c41f36f199dbe806ebb50e068c5 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/signal.h>
 #include <linux/ioport.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/ptrace.h>
 #include <linux/slab.h>
 #include <linux/random.h>
 #include <linux/kallsyms.h>
 #include <linux/proc_fs.h>
 
-#include <asm/irq.h>
 #include <asm/system.h>
-#include <asm/mach/irq.h>
 #include <asm/mach/time.h>
 
-/*
- * Maximum IRQ count.  Currently, this is arbitary.  However, it should
- * not be set too low to prevent false triggering.  Conversely, if it
- * is set too high, then you could miss a stuck IRQ.
- *
- * Maybe we ought to set a timer and re-enable the IRQ at a later time?
- */
-#define MAX_IRQ_CNT    100000
-
-static int noirqdebug __read_mostly;
-static volatile unsigned long irq_err_count;
-static DEFINE_SPINLOCK(irq_controller_lock);
-static LIST_HEAD(irq_pending);
-
-struct irqdesc irq_desc[NR_IRQS];
-void (*init_arch_irq)(void) __initdata = NULL;
-
 /*
  * No architecture-specific irq_finish function defined in arm/arch/irqs.h.
  */
@@ -66,163 +48,8 @@ void (*init_arch_irq)(void) __initdata = NULL;
 #define irq_finish(irq) do { } while (0)
 #endif
 
-/*
- * Dummy mask/unmask handler
- */
-void dummy_mask_unmask_irq(unsigned int irq)
-{
-}
-
-irqreturn_t no_action(int irq, void *dev_id, struct pt_regs *regs)
-{
-       return IRQ_NONE;
-}
-
-void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
-{
-       irq_err_count++;
-       printk(KERN_ERR "IRQ: spurious interrupt %d\n", irq);
-}
-
-static struct irqchip bad_chip = {
-       .ack    = dummy_mask_unmask_irq,
-       .mask   = dummy_mask_unmask_irq,
-       .unmask = dummy_mask_unmask_irq,
-};
-
-static struct irqdesc bad_irq_desc = {
-       .chip           = &bad_chip,
-       .handle         = do_bad_IRQ,
-       .pend           = LIST_HEAD_INIT(bad_irq_desc.pend),
-       .disable_depth  = 1,
-};
-
-#ifdef CONFIG_SMP
-void synchronize_irq(unsigned int irq)
-{
-       struct irqdesc *desc = irq_desc + irq;
-
-       while (desc->running)
-               barrier();
-}
-EXPORT_SYMBOL(synchronize_irq);
-
-#define smp_set_running(desc)  do { desc->running = 1; } while (0)
-#define smp_clear_running(desc)        do { desc->running = 0; } while (0)
-#else
-#define smp_set_running(desc)  do { } while (0)
-#define smp_clear_running(desc)        do { } while (0)
-#endif
-
-/**
- *     disable_irq_nosync - disable an irq without waiting
- *     @irq: Interrupt to disable
- *
- *     Disable the selected interrupt line.  Enables and disables
- *     are nested.  We do this lazily.
- *
- *     This function may be called from IRQ context.
- */
-void disable_irq_nosync(unsigned int irq)
-{
-       struct irqdesc *desc = irq_desc + irq;
-       unsigned long flags;
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       desc->disable_depth++;
-       list_del_init(&desc->pend);
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-}
-EXPORT_SYMBOL(disable_irq_nosync);
-
-/**
- *     disable_irq - disable an irq and wait for completion
- *     @irq: Interrupt to disable
- *
- *     Disable the selected interrupt line.  Enables and disables
- *     are nested.  This functions waits for any pending IRQ
- *     handlers for this interrupt to complete before returning.
- *     If you use this function while holding a resource the IRQ
- *     handler may need you will deadlock.
- *
- *     This function may be called - with care - from IRQ context.
- */
-void disable_irq(unsigned int irq)
-{
-       struct irqdesc *desc = irq_desc + irq;
-
-       disable_irq_nosync(irq);
-       if (desc->action)
-               synchronize_irq(irq);
-}
-EXPORT_SYMBOL(disable_irq);
-
-/**
- *     enable_irq - enable interrupt handling on an irq
- *     @irq: Interrupt to enable
- *
- *     Re-enables the processing of interrupts on this IRQ line.
- *     Note that this may call the interrupt handler, so you may
- *     get unexpected results if you hold IRQs disabled.
- *
- *     This function may be called from IRQ context.
- */
-void enable_irq(unsigned int irq)
-{
-       struct irqdesc *desc = irq_desc + irq;
-       unsigned long flags;
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       if (unlikely(!desc->disable_depth)) {
-               printk("enable_irq(%u) unbalanced from %p\n", irq,
-                       __builtin_return_address(0));
-       } else if (!--desc->disable_depth) {
-               desc->probing = 0;
-               desc->chip->unmask(irq);
-
-               /*
-                * If the interrupt is waiting to be processed,
-                * try to re-run it.  We can't directly run it
-                * from here since the caller might be in an
-                * interrupt-protected region.
-                */
-               if (desc->pending && list_empty(&desc->pend)) {
-                       desc->pending = 0;
-                       if (!desc->chip->retrigger ||
-                           desc->chip->retrigger(irq))
-                               list_add(&desc->pend, &irq_pending);
-               }
-       }
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-}
-EXPORT_SYMBOL(enable_irq);
-
-/*
- * Enable wake on selected irq
- */
-void enable_irq_wake(unsigned int irq)
-{
-       struct irqdesc *desc = irq_desc + irq;
-       unsigned long flags;
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       if (desc->chip->set_wake)
-               desc->chip->set_wake(irq, 1);
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-}
-EXPORT_SYMBOL(enable_irq_wake);
-
-void disable_irq_wake(unsigned int irq)
-{
-       struct irqdesc *desc = irq_desc + irq;
-       unsigned long flags;
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       if (desc->chip->set_wake)
-               desc->chip->set_wake(irq, 0);
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-}
-EXPORT_SYMBOL(disable_irq_wake);
+void (*init_arch_irq)(void) __initdata = NULL;
+unsigned long irq_err_count;
 
 int show_interrupts(struct seq_file *p, void *v)
 {
@@ -242,8 +69,8 @@ int show_interrupts(struct seq_file *p, void *v)
        }
 
        if (i < NR_IRQS) {
-               spin_lock_irqsave(&irq_controller_lock, flags);
-               action = irq_desc[i].action;
+               spin_lock_irqsave(&irq_desc[i].lock, flags);
+               action = irq_desc[i].action;
                if (!action)
                        goto unlock;
 
@@ -256,7 +83,7 @@ int show_interrupts(struct seq_file *p, void *v)
 
                seq_putc(p, '\n');
 unlock:
-               spin_unlock_irqrestore(&irq_controller_lock, flags);
+               spin_unlock_irqrestore(&irq_desc[i].lock, flags);
        } else if (i == NR_IRQS) {
 #ifdef CONFIG_ARCH_ACORN
                show_fiq_list(p, v);
@@ -270,267 +97,11 @@ unlock:
        return 0;
 }
 
-/*
- * IRQ lock detection.
- *
- * Hopefully, this should get us out of a few locked situations.
- * However, it may take a while for this to happen, since we need
- * a large number if IRQs to appear in the same jiffie with the
- * same instruction pointer (or within 2 instructions).
- */
-static int check_irq_lock(struct irqdesc *desc, int irq, struct pt_regs *regs)
-{
-       unsigned long instr_ptr = instruction_pointer(regs);
-
-       if (desc->lck_jif == jiffies &&
-           desc->lck_pc >= instr_ptr && desc->lck_pc < instr_ptr + 8) {
-               desc->lck_cnt += 1;
-
-               if (desc->lck_cnt > MAX_IRQ_CNT) {
-                       printk(KERN_ERR "IRQ LOCK: IRQ%d is locking the system, disabled\n", irq);
-                       return 1;
-               }
-       } else {
-               desc->lck_cnt = 0;
-               desc->lck_pc  = instruction_pointer(regs);
-               desc->lck_jif = jiffies;
-       }
-       return 0;
-}
-
-static void
-report_bad_irq(unsigned int irq, struct pt_regs *regs, struct irqdesc *desc, int ret)
-{
-       static int count = 100;
-       struct irqaction *action;
-
-       if (noirqdebug)
-               return;
-
-       if (ret != IRQ_HANDLED && ret != IRQ_NONE) {
-               if (!count)
-                       return;
-               count--;
-               printk("irq%u: bogus retval mask %x\n", irq, ret);
-       } else {
-               desc->irqs_unhandled++;
-               if (desc->irqs_unhandled <= 99900)
-                       return;
-               desc->irqs_unhandled = 0;
-               printk("irq%u: nobody cared\n", irq);
-       }
-       show_regs(regs);
-       dump_stack();
-       printk(KERN_ERR "handlers:");
-       action = desc->action;
-       do {
-               printk("\n" KERN_ERR "[<%p>]", action->handler);
-               print_symbol(" (%s)", (unsigned long)action->handler);
-               action = action->next;
-       } while (action);
-       printk("\n");
-}
-
-static int
-__do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
-{
-       unsigned int status;
-       int ret, retval = 0;
-
-       spin_unlock(&irq_controller_lock);
-
-#ifdef CONFIG_NO_IDLE_HZ
-       if (!(action->flags & SA_TIMER) && system_timer->dyn_tick != NULL) {
-               spin_lock(&system_timer->dyn_tick->lock);
-               if (system_timer->dyn_tick->state & DYN_TICK_ENABLED)
-                       system_timer->dyn_tick->handler(irq, 0, regs);
-               spin_unlock(&system_timer->dyn_tick->lock);
-       }
-#endif
-
-       if (!(action->flags & SA_INTERRUPT))
-               local_irq_enable();
-
-       status = 0;
-       do {
-               ret = action->handler(irq, action->dev_id, regs);
-               if (ret == IRQ_HANDLED)
-                       status |= action->flags;
-               retval |= ret;
-               action = action->next;
-       } while (action);
-
-       if (status & SA_SAMPLE_RANDOM)
-               add_interrupt_randomness(irq);
-
-       spin_lock_irq(&irq_controller_lock);
-
-       return retval;
-}
-
-/*
- * This is for software-decoded IRQs.  The caller is expected to
- * handle the ack, clear, mask and unmask issues.
- */
-void
-do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
-{
-       struct irqaction *action;
-       const unsigned int cpu = smp_processor_id();
-
-       desc->triggered = 1;
-
-       kstat_cpu(cpu).irqs[irq]++;
-
-       smp_set_running(desc);
-
-       action = desc->action;
-       if (action) {
-               int ret = __do_irq(irq, action, regs);
-               if (ret != IRQ_HANDLED)
-                       report_bad_irq(irq, regs, desc, ret);
-       }
-
-       smp_clear_running(desc);
-}
-
-/*
- * Most edge-triggered IRQ implementations seem to take a broken
- * approach to this.  Hence the complexity.
- */
-void
-do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
-{
-       const unsigned int cpu = smp_processor_id();
-
-       desc->triggered = 1;
-
-       /*
-        * If we're currently running this IRQ, or its disabled,
-        * we shouldn't process the IRQ.  Instead, turn on the
-        * hardware masks.
-        */
-       if (unlikely(desc->running || desc->disable_depth))
-               goto running;
-
-       /*
-        * Acknowledge and clear the IRQ, but don't mask it.
-        */
-       desc->chip->ack(irq);
-
-       /*
-        * Mark the IRQ currently in progress.
-        */
-       desc->running = 1;
-
-       kstat_cpu(cpu).irqs[irq]++;
-
-       do {
-               struct irqaction *action;
-
-               action = desc->action;
-               if (!action)
-                       break;
-
-               if (desc->pending && !desc->disable_depth) {
-                       desc->pending = 0;
-                       desc->chip->unmask(irq);
-               }
-
-               __do_irq(irq, action, regs);
-       } while (desc->pending && !desc->disable_depth);
-
-       desc->running = 0;
-
-       /*
-        * If we were disabled or freed, shut down the handler.
-        */
-       if (likely(desc->action && !check_irq_lock(desc, irq, regs)))
-               return;
-
- running:
-       /*
-        * We got another IRQ while this one was masked or
-        * currently running.  Delay it.
-        */
-       desc->pending = 1;
-       desc->chip->mask(irq);
-       desc->chip->ack(irq);
-}
-
-/*
- * Level-based IRQ handler.  Nice and simple.
- */
-void
-do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
-{
-       struct irqaction *action;
-       const unsigned int cpu = smp_processor_id();
-
-       desc->triggered = 1;
-
-       /*
-        * Acknowledge, clear _AND_ disable the interrupt.
-        */
-       desc->chip->ack(irq);
-
-       if (likely(!desc->disable_depth)) {
-               kstat_cpu(cpu).irqs[irq]++;
-
-               smp_set_running(desc);
-
-               /*
-                * Return with this interrupt masked if no action
-                */
-               action = desc->action;
-               if (action) {
-                       int ret = __do_irq(irq, desc->action, regs);
-
-                       if (ret != IRQ_HANDLED)
-                               report_bad_irq(irq, regs, desc, ret);
-
-                       if (likely(!desc->disable_depth &&
-                                  !check_irq_lock(desc, irq, regs)))
-                               desc->chip->unmask(irq);
-               }
-
-               smp_clear_running(desc);
-       }
-}
-
-static void do_pending_irqs(struct pt_regs *regs)
-{
-       struct list_head head, *l, *n;
-
-       do {
-               struct irqdesc *desc;
-
-               /*
-                * First, take the pending interrupts off the list.
-                * The act of calling the handlers may add some IRQs
-                * back onto the list.
-                */
-               head = irq_pending;
-               INIT_LIST_HEAD(&irq_pending);
-               head.next->prev = &head;
-               head.prev->next = &head;
-
-               /*
-                * Now run each entry.  We must delete it from our
-                * list before calling the handler.
-                */
-               list_for_each_safe(l, n, &head) {
-                       desc = list_entry(l, struct irqdesc, pend);
-                       list_del_init(&desc->pend);
-                       desc_handle_irq(desc - irq_desc, desc, regs);
-               }
-
-               /*
-                * The list must be empty.
-                */
-               BUG_ON(!list_empty(&head));
-       } while (!list_empty(&irq_pending));
-}
+/* Handle bad interrupts */
+static struct irq_desc bad_irq_desc = {
+       .handle_irq = handle_bad_irq,
+       .lock = SPIN_LOCK_UNLOCKED
+};
 
 /*
  * do_IRQ handles all hardware IRQ's.  Decoded IRQs should not
@@ -549,96 +120,15 @@ asmlinkage void asm_do_IRQ(unsigned int irq, struct pt_regs *regs)
                desc = &bad_irq_desc;
 
        irq_enter();
-       spin_lock(&irq_controller_lock);
-       desc_handle_irq(irq, desc, regs);
 
-       /*
-        * Now re-run any pending interrupts.
-        */
-       if (!list_empty(&irq_pending))
-               do_pending_irqs(regs);
+       desc_handle_irq(irq, desc, regs);
 
+       /* AT91 specific workaround */
        irq_finish(irq);
 
-       spin_unlock(&irq_controller_lock);
        irq_exit();
 }
 
-void __set_irq_handler(unsigned int irq, irq_handler_t handle, int is_chained)
-{
-       struct irqdesc *desc;
-       unsigned long flags;
-
-       if (irq >= NR_IRQS) {
-               printk(KERN_ERR "Trying to install handler for IRQ%d\n", irq);
-               return;
-       }
-
-       if (handle == NULL)
-               handle = do_bad_IRQ;
-
-       desc = irq_desc + irq;
-
-       if (is_chained && desc->chip == &bad_chip)
-               printk(KERN_WARNING "Trying to install chained handler for IRQ%d\n", irq);
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       if (handle == do_bad_IRQ) {
-               desc->chip->mask(irq);
-               desc->chip->ack(irq);
-               desc->disable_depth = 1;
-       }
-       desc->handle = handle;
-       if (handle != do_bad_IRQ && is_chained) {
-               desc->valid = 0;
-               desc->probe_ok = 0;
-               desc->disable_depth = 0;
-               desc->chip->unmask(irq);
-       }
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-}
-
-void set_irq_chip(unsigned int irq, struct irqchip *chip)
-{
-       struct irqdesc *desc;
-       unsigned long flags;
-
-       if (irq >= NR_IRQS) {
-               printk(KERN_ERR "Trying to install chip for IRQ%d\n", irq);
-               return;
-       }
-
-       if (chip == NULL)
-               chip = &bad_chip;
-
-       desc = irq_desc + irq;
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       desc->chip = chip;
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-}
-
-int set_irq_type(unsigned int irq, unsigned int type)
-{
-       struct irqdesc *desc;
-       unsigned long flags;
-       int ret = -ENXIO;
-
-       if (irq >= NR_IRQS) {
-               printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq);
-               return -ENODEV;
-       }
-
-       desc = irq_desc + irq;
-       if (desc->chip->set_type) {
-               spin_lock_irqsave(&irq_controller_lock, flags);
-               ret = desc->chip->set_type(irq, type);
-               spin_unlock_irqrestore(&irq_controller_lock, flags);
-       }
-
-       return ret;
-}
-EXPORT_SYMBOL(set_irq_type);
-
 void set_irq_flags(unsigned int irq, unsigned int iflags)
 {
        struct irqdesc *desc;
@@ -650,421 +140,32 @@ void set_irq_flags(unsigned int irq, unsigned int iflags)
        }
 
        desc = irq_desc + irq;
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       desc->valid = (iflags & IRQF_VALID) != 0;
-       desc->probe_ok = (iflags & IRQF_PROBE) != 0;
-       desc->noautoenable = (iflags & IRQF_NOAUTOEN) != 0;
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-}
-
-int setup_irq(unsigned int irq, struct irqaction *new)
-{
-       int shared = 0;
-       struct irqaction *old, **p;
-       unsigned long flags;
-       struct irqdesc *desc;
-
-       /*
-        * Some drivers like serial.c use request_irq() heavily,
-        * so we have to be careful not to interfere with a
-        * running system.
-        */
-       if (new->flags & SA_SAMPLE_RANDOM) {
-               /*
-                * This function might sleep, we want to call it first,
-                * outside of the atomic block.
-                * Yes, this might clear the entropy pool if the wrong
-                * driver is attempted to be loaded, without actually
-                * installing a new handler, but is this really a problem,
-                * only the sysadmin is able to do this.
-                */
-               rand_initialize_irq(irq);
-       }
-
-       /*
-        * The following block of code has to be executed atomically
-        */
-       desc = irq_desc + irq;
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       p = &desc->action;
-       if ((old = *p) != NULL) {
-               /*
-                * Can't share interrupts unless both agree to and are
-                * the same type.
-                */
-               if (!(old->flags & new->flags & SA_SHIRQ) ||
-                   (~old->flags & new->flags) & SA_TRIGGER_MASK) {
-                       spin_unlock_irqrestore(&irq_controller_lock, flags);
-                       return -EBUSY;
-               }
-
-               /* add new interrupt at end of irq queue */
-               do {
-                       p = &old->next;
-                       old = *p;
-               } while (old);
-               shared = 1;
-       }
-
-       *p = new;
-
-       if (!shared) {
-               desc->probing = 0;
-               desc->running = 0;
-               desc->pending = 0;
-               desc->disable_depth = 1;
-
-               if (new->flags & SA_TRIGGER_MASK &&
-                   desc->chip->set_type) {
-                       unsigned int type = new->flags & SA_TRIGGER_MASK;
-                       desc->chip->set_type(irq, type);
-               }
-
-               if (!desc->noautoenable) {
-                       desc->disable_depth = 0;
-                       desc->chip->unmask(irq);
-               }
-       }
-
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-       return 0;
-}
-
-/**
- *     request_irq - allocate an interrupt line
- *     @irq: Interrupt line to allocate
- *     @handler: Function to be called when the IRQ occurs
- *     @irqflags: Interrupt type flags
- *     @devname: An ascii name for the claiming device
- *     @dev_id: A cookie passed back to the handler function
- *
- *     This call allocates interrupt resources and enables the
- *     interrupt line and IRQ handling. From the point this
- *     call is made your handler function may be invoked. Since
- *     your handler function must clear any interrupt the board
- *     raises, you must take care both to initialise your hardware
- *     and to set up the interrupt handler in the right order.
- *
- *     Dev_id must be globally unique. Normally the address of the
- *     device data structure is used as the cookie. Since the handler
- *     receives this value it makes sense to use it.
- *
- *     If your interrupt is shared you must pass a non NULL dev_id
- *     as this is required when freeing the interrupt.
- *
- *     Flags:
- *
- *     SA_SHIRQ                Interrupt is shared
- *
- *     SA_INTERRUPT            Disable local interrupts while processing
- *
- *     SA_SAMPLE_RANDOM        The interrupt can be used for entropy
- *
- */
-int request_irq(unsigned int irq, irqreturn_t (*handler)(int, void *, struct pt_regs *),
-                unsigned long irq_flags, const char * devname, void *dev_id)
-{
-       unsigned long retval;
-       struct irqaction *action;
-
-       if (irq >= NR_IRQS || !irq_desc[irq].valid || !handler ||
-           (irq_flags & SA_SHIRQ && !dev_id))
-               return -EINVAL;
-
-       action = (struct irqaction *)kmalloc(sizeof(struct irqaction), GFP_KERNEL);
-       if (!action)
-               return -ENOMEM;
-
-       action->handler = handler;
-       action->flags = irq_flags;
-       cpus_clear(action->mask);
-       action->name = devname;
-       action->next = NULL;
-       action->dev_id = dev_id;
-
-       retval = setup_irq(irq, action);
-
-       if (retval)
-               kfree(action);
-       return retval;
-}
-
-EXPORT_SYMBOL(request_irq);
-
-/**
- *     free_irq - free an interrupt
- *     @irq: Interrupt line to free
- *     @dev_id: Device identity to free
- *
- *     Remove an interrupt handler. The handler is removed and if the
- *     interrupt line is no longer in use by any driver it is disabled.
- *     On a shared IRQ the caller must ensure the interrupt is disabled
- *     on the card it drives before calling this function.
- *
- *     This function must not be called from interrupt context.
- */
-void free_irq(unsigned int irq, void *dev_id)
-{
-       struct irqaction * action, **p;
-       unsigned long flags;
-
-       if (irq >= NR_IRQS || !irq_desc[irq].valid) {
-               printk(KERN_ERR "Trying to free IRQ%d\n",irq);
-               dump_stack();
-               return;
-       }
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       for (p = &irq_desc[irq].action; (action = *p) != NULL; p = &action->next) {
-               if (action->dev_id != dev_id)
-                       continue;
-
-               /* Found it - now free it */
-               *p = action->next;
-               break;
-       }
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-
-       if (!action) {
-               printk(KERN_ERR "Trying to free free IRQ%d\n",irq);
-               dump_stack();
-       } else {
-               synchronize_irq(irq);
-               kfree(action);
-       }
-}
-
-EXPORT_SYMBOL(free_irq);
-
-static DECLARE_MUTEX(probe_sem);
-
-/* Start the interrupt probing.  Unlike other architectures,
- * we don't return a mask of interrupts from probe_irq_on,
- * but return the number of interrupts enabled for the probe.
- * The interrupts which have been enabled for probing is
- * instead recorded in the irq_desc structure.
- */
-unsigned long probe_irq_on(void)
-{
-       unsigned int i, irqs = 0;
-       unsigned long delay;
-
-       down(&probe_sem);
-
-       /*
-        * first snaffle up any unassigned but
-        * probe-able interrupts
-        */
-       spin_lock_irq(&irq_controller_lock);
-       for (i = 0; i < NR_IRQS; i++) {
-               if (!irq_desc[i].probe_ok || irq_desc[i].action)
-                       continue;
-
-               irq_desc[i].probing = 1;
-               irq_desc[i].triggered = 0;
-               if (irq_desc[i].chip->set_type)
-                       irq_desc[i].chip->set_type(i, IRQT_PROBE);
-               irq_desc[i].chip->unmask(i);
-               irqs += 1;
-       }
-       spin_unlock_irq(&irq_controller_lock);
-
-       /*
-        * wait for spurious interrupts to mask themselves out again
-        */
-       for (delay = jiffies + HZ/10; time_before(jiffies, delay); )
-               /* min 100ms delay */;
-
-       /*
-        * now filter out any obviously spurious interrupts
-        */
-       spin_lock_irq(&irq_controller_lock);
-       for (i = 0; i < NR_IRQS; i++) {
-               if (irq_desc[i].probing && irq_desc[i].triggered) {
-                       irq_desc[i].probing = 0;
-                       irqs -= 1;
-               }
-       }
-       spin_unlock_irq(&irq_controller_lock);
-
-       return irqs;
-}
-
-EXPORT_SYMBOL(probe_irq_on);
-
-unsigned int probe_irq_mask(unsigned long irqs)
-{
-       unsigned int mask = 0, i;
-
-       spin_lock_irq(&irq_controller_lock);
-       for (i = 0; i < 16 && i < NR_IRQS; i++)
-               if (irq_desc[i].probing && irq_desc[i].triggered)
-                       mask |= 1 << i;
-       spin_unlock_irq(&irq_controller_lock);
-
-       up(&probe_sem);
-
-       return mask;
-}
-EXPORT_SYMBOL(probe_irq_mask);
-
-/*
- * Possible return values:
- *  >= 0 - interrupt number
- *    -1 - no interrupt/many interrupts
- */
-int probe_irq_off(unsigned long irqs)
-{
-       unsigned int i;
-       int irq_found = NO_IRQ;
-
-       /*
-        * look at the interrupts, and find exactly one
-        * that we were probing has been triggered
-        */
-       spin_lock_irq(&irq_controller_lock);
-       for (i = 0; i < NR_IRQS; i++) {
-               if (irq_desc[i].probing &&
-                   irq_desc[i].triggered) {
-                       if (irq_found != NO_IRQ) {
-                               irq_found = NO_IRQ;
-                               goto out;
-                       }
-                       irq_found = i;
-               }
-       }
-
-       if (irq_found == -1)
-               irq_found = NO_IRQ;
-out:
-       spin_unlock_irq(&irq_controller_lock);
-
-       up(&probe_sem);
-
-       return irq_found;
-}
-
-EXPORT_SYMBOL(probe_irq_off);
-
-#ifdef CONFIG_SMP
-static void route_irq(struct irqdesc *desc, unsigned int irq, unsigned int cpu)
-{
-       pr_debug("IRQ%u: moving from cpu%u to cpu%u\n", irq, desc->cpu, cpu);
-
-       spin_lock_irq(&irq_controller_lock);
-       desc->cpu = cpu;
-       desc->chip->set_cpu(desc, irq, cpu);
-       spin_unlock_irq(&irq_controller_lock);
-}
-
-#ifdef CONFIG_PROC_FS
-static int
-irq_affinity_read_proc(char *page, char **start, off_t off, int count,
-                      int *eof, void *data)
-{
-       struct irqdesc *desc = irq_desc + ((int)data);
-       int len = cpumask_scnprintf(page, count, desc->affinity);
-
-       if (count - len < 2)
-               return -EINVAL;
-       page[len++] = '\n';
-       page[len] = '\0';
-
-       return len;
-}
-
-static int
-irq_affinity_write_proc(struct file *file, const char __user *buffer,
-                       unsigned long count, void *data)
-{
-       unsigned int irq = (unsigned int)data;
-       struct irqdesc *desc = irq_desc + irq;
-       cpumask_t affinity, tmp;
-       int ret = -EIO;
-
-       if (!desc->chip->set_cpu)
-               goto out;
-
-       ret = cpumask_parse(buffer, count, affinity);
-       if (ret)
-               goto out;
-
-       cpus_and(tmp, affinity, cpu_online_map);
-       if (cpus_empty(tmp)) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       desc->affinity = affinity;
-       route_irq(desc, irq, first_cpu(tmp));
-       ret = count;
-
- out:
-       return ret;
-}
-#endif
-#endif
-
-void __init init_irq_proc(void)
-{
-#if defined(CONFIG_SMP) && defined(CONFIG_PROC_FS)
-       struct proc_dir_entry *dir;
-       int irq;
-
-       dir = proc_mkdir("irq", NULL);
-       if (!dir)
-               return;
-
-       for (irq = 0; irq < NR_IRQS; irq++) {
-               struct proc_dir_entry *entry;
-               struct irqdesc *desc;
-               char name[16];
-
-               desc = irq_desc + irq;
-               memset(name, 0, sizeof(name));
-               snprintf(name, sizeof(name) - 1, "%u", irq);
-
-               desc->procdir = proc_mkdir(name, dir);
-               if (!desc->procdir)
-                       continue;
-
-               entry = create_proc_entry("smp_affinity", 0600, desc->procdir);
-               if (entry) {
-                       entry->nlink = 1;
-                       entry->data = (void *)irq;
-                       entry->read_proc = irq_affinity_read_proc;
-                       entry->write_proc = irq_affinity_write_proc;
-               }
-       }
-#endif
+       spin_lock_irqsave(&desc->lock, flags);
+       desc->status |= IRQ_NOREQUEST | IRQ_NOPROBE | IRQ_NOAUTOEN;
+       if (iflags & IRQF_VALID)
+               desc->status &= ~IRQ_NOREQUEST;
+       if (iflags & IRQF_PROBE)
+               desc->status &= ~IRQ_NOPROBE;
+       if (!(iflags & IRQF_NOAUTOEN))
+               desc->status &= ~IRQ_NOAUTOEN;
+       spin_unlock_irqrestore(&desc->lock, flags);
 }
 
 void __init init_IRQ(void)
 {
-       struct irqdesc *desc;
        int irq;
 
+       for (irq = 0; irq < NR_IRQS; irq++)
+               irq_desc[irq].status |= IRQ_NOREQUEST | IRQ_DELAYED_DISABLE |
+                       IRQ_NOPROBE;
+
 #ifdef CONFIG_SMP
        bad_irq_desc.affinity = CPU_MASK_ALL;
        bad_irq_desc.cpu = smp_processor_id();
 #endif
-
-       for (irq = 0, desc = irq_desc; irq < NR_IRQS; irq++, desc++) {
-               *desc = bad_irq_desc;
-               INIT_LIST_HEAD(&desc->pend);
-       }
-
        init_arch_irq();
 }
 
-static int __init noirqdebug_setup(char *str)
-{
-       noirqdebug = 1;
-       return 1;
-}
-
-__setup("noirqdebug", noirqdebug_setup);
-
 #ifdef CONFIG_HOTPLUG_CPU
 /*
  * The CPU has been marked offline.  Migrate IRQs off this CPU.  If
index dc38e06ada6376d67952f3e8b97848338701acf7..0aa22650a00f2e8ac4564cc34f29573e717ba0fb 100644 (file)
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/time.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/mach/time.h>
 
 static unsigned long last_crtr;
index 83c34747087bde8ed0a328ddaaa2db4032bbb049..5783c282ae7b3e3288160a1cab22bf4db71d8172 100644 (file)
  */
 
 #include <linux/errno.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/module.h>
 
 #include <asm/io.h>
-#include <asm/mach/irq.h>
 #include <asm/hardware.h>
 #include <asm/arch/gpio.h>
 
@@ -340,7 +341,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
        void __iomem    *pio;
        u32             isr;
 
-       pio = desc->base;
+       pio = get_irq_chip_data(irq);
 
        /* temporarily mask (level sensitive) parent IRQ */
        desc->chip->ack(irq);
@@ -350,12 +351,12 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
                if (!isr)
                        break;
 
-               pin = (unsigned) desc->data;
+               pin = (unsigned) get_irq_data(irq);
                gpio = &irq_desc[pin];
 
                while (isr) {
                        if (isr & 1) {
-                               if (unlikely(gpio->disable_depth)) {
+                               if (unlikely(gpio->depth)) {
                                        /*
                                         * The core ARM interrupt handler lazily disables IRQs so
                                         * another IRQ must be generated before it actually gets
@@ -364,7 +365,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
                                        gpio_irq_mask(pin);
                                }
                                else
-                                       gpio->handle(pin, gpio, regs);
+                                       desc_handle_irq(pin, gpio, regs);
                        }
                        pin++;
                        gpio++;
index 1a23f0dcd4b89cee7e8b6b3afedbaeb80aab9ed3..b0f1db258e80d864b62ac1c50786704c1d32f519 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/timex.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/sched.h>
 
 #include <asm/hardware.h>
index 5b12cab0e6917b750500ac6ae72796768a8c31ff..cd66df896364af6af69cc3aa43f20ad1c5524403 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/kernel.h>
 #include <linux/types.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/list.h>
 #include <linux/sched.h>
 #include <linux/init.h>
index 14a62d6008fe2f6165001d34ebc5c0d894f2084b..e668d4acd808ca56db971c80c4775f2e33f2794d 100644 (file)
@@ -6,6 +6,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/irq.h>
 
index c1d74f7ab669f76948663796e6de753131fa64aa..282b473c21f2f9af9774fc540b8e2a0cba64155b 100644 (file)
@@ -6,6 +6,7 @@
  */
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
index 294b1c450f216f60091e1c9647d966abaf098a55..5f9a04775a47d5f1978414a089648c5da680a48e 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/time.h>
 
 #include <asm/hardware.h>
index 576a5e979c0003b6ed8112ce15d1b2d2dacea8c2..2d7e505e748fc84b145f7ebda8422771a5ae40fc 100644 (file)
@@ -13,6 +13,7 @@
 #include <linux/device.h>
 #include <linux/spinlock.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
 #include <linux/termios.h>
index 3cfc5aab82596032a8b99d2bef54b1c18f5646be..b31f31ac937b09e32aff9c4b86c6323ea78fa5a2 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/spinlock.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/serial.h>
 #include <linux/tty.h>
 #include <linux/bitops.h>
@@ -408,7 +409,7 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc,  str
        for(i = 31; i >= 0; i--) {
                if(status & (1 << i)) {
                        desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + i;
-                       desc->handle(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs);
+                       desc_handle_irq(IRQ_IXP2000_DRAM0_MIN_ERR + i, desc, regs);
                }
        }
 }
index 9b8ded2598077113e55516217958c2a7446ff245..40eef8b367407dd0a6ab61cb46d0484d8c54db60 100644 (file)
@@ -167,7 +167,7 @@ void ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long
        }
 
        /* Hook into PCI interrupt */
-       set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x00_irq_handler);
+       set_irq_chained_handler(IRQ_IXP2000_PCIB, ixdp2x00_irq_handler);
 }
 
 /*************************************************************************
index 8477ae1d8f72edf43a2922de1031d9f1847c028d..7f42366f60d165d11666666bf8593b8efa4f49ca 100644 (file)
@@ -127,7 +127,7 @@ void __init ixdp2x01_init_irq(void)
        }
 
        /* Hook into PCI interrupts */
-       set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x01_irq_handler);
+       set_irq_chained_handler(IRQ_IXP2000_PCIB, ixdp2x01_irq_handler);
 }
 
 
index 82ad6ef90a38551c38bfb4ebb07fb2db6f3fe9be..7c218aecf4434bb5d9ab00884985c75b3637177f 100644 (file)
@@ -271,7 +271,7 @@ static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *
        }
 
        int_desc = irq_desc + irqno;
-       int_desc->handle(irqno, int_desc, regs);
+       desc_handle_irq(irqno, int_desc, regs);
 
        desc->chip->unmask(irq);
 }
index bba9d9f086919d3ca19da42df4fa0827efebc14d..37a32e6bcca2d1e52cb88128f091cd5858efdc57 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/spinlock.h>
 #include <linux/sched.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/serial.h>
 #include <linux/tty.h>
 #include <linux/bitops.h>
@@ -36,7 +37,6 @@
 #include <asm/memory.h>
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
-#include <asm/irq.h>
 #include <asm/system.h>
 #include <asm/tlbflush.h>
 #include <asm/pgtable.h>
@@ -74,7 +74,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct
                        int cpld_irq =
                                IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i);
                        cpld_desc = irq_desc + cpld_irq;
-                       cpld_desc->handle(cpld_irq, cpld_desc, regs);
+                       desc_handle_irq(cpld_irq, cpld_desc, regs);
                }
        }
 
@@ -111,7 +111,7 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct
                        int cpld_irq =
                                IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i);
                        cpld_desc = irq_desc + cpld_irq;
-                       cpld_desc->handle(cpld_irq, cpld_desc, regs);
+                       desc_handle_irq(cpld_irq, cpld_desc, regs);
                }
        }
 
@@ -158,8 +158,8 @@ void ixdp2351_init_irq(void)
                }
        }
 
-       set_irq_chained_handler(IRQ_IXP23XX_INTA, &ixdp2351_inta_handler);
-       set_irq_chained_handler(IRQ_IXP23XX_INTB, &ixdp2351_intb_handler);
+       set_irq_chained_handler(IRQ_IXP23XX_INTA, ixdp2351_inta_handler);
+       set_irq_chained_handler(IRQ_IXP23XX_INTB, ixdp2351_intb_handler);
 }
 
 /*
index e6b7fcd923faaf46fdb9a02887acf0566e21eb79..2cebb2878895bdb0afc2a0707caf3bfde91bba57 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 
 #include <asm/mach-types.h>
 #include <asm/hardware.h>
index 8b8ca80c94490177be32788b43715ecd84a7a692..d5156c043f0b09094ba5279c651afd52162f9466 100644 (file)
@@ -17,6 +17,7 @@
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 #include <linux/delay.h>
 
 #include <asm/mach/pci.h>
index 526fb6175bc312538ec835d52ab254949d595167..ed52708002174e222f635ef3c701fc1b8dbabbf7 100644 (file)
 #include <linux/kernel.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 
 #include <asm/mach-types.h>
 #include <asm/hardware.h>
-#include <asm/irq.h>
 
 #include <asm/mach/pci.h>
 
index 2d3b770d9e8254db2554f8cc9b61cf6f05db93ea..b8ebaf4a9c8e5db0dfba464bc70803aa7d04952c 100644 (file)
@@ -17,6 +17,7 @@
 
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 
 #include <asm/mach/pci.h>
 #include <asm/mach-types.h>
index a3745ed37f9fc5c81e75bf491cc00c8d83e46835..f58a1d05a02e46e724a2de687786820f76a6a632 100644 (file)
@@ -17,9 +17,9 @@
  *
  */
 
-#include <linux/module.h>
-#include <linux/reboot.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
+#include <linux/module.h>
 #include <linux/reboot.h>
 
 #include <asm/mach-types.h>
index ac626436e96f09881cfd25e8c2c6827397a000da..b7af5640ea7bde758e804c119ad2be41bdf02102 100644 (file)
@@ -7,6 +7,7 @@
  */
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 #include <linux/device.h>
 
 #include <asm/types.h>
index c0e6854289f14ae7554ebd3815a78386bfd9e1a6..35c3606a20795f89be0567402ecf613187e5f878 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/init.h>
 #include <linux/platform_device.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/hardware.h>
 #include <asm/setup.h>
index 1919835d9610a6a07195e5c6299569f2d573921a..4d26c9f62c71b249703813e686262fd042f2507b 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/time.h>
 
 #include <asm/hardware.h>
index e0711d23a6b01bec0189b7fce0fa145e7ec49709..91933301bb73268325f46152cefc358a279b732a 100644 (file)
@@ -29,7 +29,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/platform_device.h>
-#include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
index 56319742aa1b9a77b79ec71538623cb4dbdaf52a..5615fb8a3d5b3b5b2ac63e1b903f6d8500ae8e96 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 #include <linux/delay.h>
 #include <linux/serial.h>
 #include <linux/tty.h>
index 347b9dea24c6ea67889d49052c6c003c7c58137c..6914d22bc20fbfb0b19c8eba67f48e0e85ef83ad 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/platform_device.h>
 #include <linux/fb.h>
 
index 0f1648780c41b36016cd7a5cb3359fd667ee6a78..1e5e6ca693ee50fa5d002afd040eb3ebaad25fbc 100644 (file)
 #include <linux/init.h>
 #include <linux/kernel.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/platform_device.h>
 
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
-#include <asm/irq.h>
 #include <asm/apm.h>
 #include <asm/arch/pm.h>
 #include <asm/arch/pxa-regs.h>
index fbbeb05530061eaf24089f3e62acea6d078edad7..def4441d24420e260278672a6fac06160ec46c53 100644 (file)
@@ -136,8 +136,8 @@ bast_irq_pc104_demux(unsigned int irq,
                for (i = 0; stat != 0; i++, stat >>= 1) {
                        if (stat & 1) {
                                irqno = bast_pc104_irqs[i];
-
-                               desc_handle_irq(irqno, irq_desc + irqno, regs);
+                               desc = irq_desc + irqno;
+                               desc_handle_irq(irqno, desc, regs);
                        }
                }
        }
@@ -156,7 +156,7 @@ static __init int bast_irq_init(void)
 
                set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux);
 
-               /* reigster our IRQs */
+               /* register our IRQs */
 
                for (i = 0; i < 4; i++) {
                        unsigned int irqno = bast_pc104_irqs[i];
index 47387c5b97233649cbe7f23451ecf389ecb53be4..c153c49c75dc384b06055c5843c9f959294c87c4 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/sched.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/err.h>
 #include <linux/clk.h>
 
index e0f6d57b506504efcaf0a4fbc5f230a368f6e7df..31afe50d7cd59746360d0dbbb642c7f87197bdcb 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/tty.h>
 #include <linux/platform_device.h>
+#include <linux/irq.h>
 #include <linux/mtd/mtd.h>
 #include <linux/mtd/partitions.h>
 
index e727ba87b9f2def3509045d39b5327cf7e5080a8..e10d661c015f8026d43ee2f9361f67b91f056809 100644 (file)
@@ -835,7 +835,7 @@ static void __init h3800_init_irq(void)
        }
 #endif
        set_irq_type(IRQ_GPIO_H3800_ASIC, IRQT_RISING);
-       set_irq_chained_handler(IRQ_GPIO_H3800_ASIC, &h3800_IRQ_demux);
+       set_irq_chained_handler(IRQ_GPIO_H3800_ASIC, h3800_IRQ_demux);
 }
 
 
index b3a56024182ee6ac15cc3e679e815661ee7095f4..2891b8ca86dd40d58b570c3c6a91272859ece838 100644 (file)
  */
 #include <linux/init.h>
 #include <linux/module.h>
+#include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/ioport.h>
 #include <linux/ptrace.h>
 #include <linux/sysdev.h>
 
 #include <asm/hardware.h>
-#include <asm/irq.h>
 #include <asm/mach/irq.h>
 
 #include "generic.h"
index 0709ebab531c2cc976b05bb244090e96e5a2092f..c7bf7e0038f07922bb294860ed75c284fbb1a811 100644 (file)
@@ -7,6 +7,7 @@
 #include <linux/tty.h>
 #include <linux/ioport.h>
 #include <linux/platform_device.h>
+#include <linux/irq.h>
 
 #include <linux/mtd/partitions.h>
 
index e4b435e634e41a657321360a5c6d22173ad98fc6..688b1e109a4069bb28cad454da15a6a231de79f1 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/timex.h>
 #include <linux/signal.h>
 
index 877600e212dd6cb36c47513fc9be4a3c381bfeb7..2f2c6e97b7a345cacf3e00ad9050815382624953 100644 (file)
@@ -6,6 +6,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/sched.h>
 #include <linux/serial_8250.h>
 
index c5d0214ef1911f1d0d4769f68642ecd60139cea9..c2c05ef863488201988229c29ca0fc440f233fbc 100644 (file)
@@ -24,9 +24,9 @@
 #include <linux/spinlock.h>
 #include <linux/errno.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 
 #include <asm/system.h>
-#include <asm/irq.h>
 #include <asm/hardware.h>
 #include <asm/dma.h>
 #include <asm/io.h>
index ae08eeec7aad0ace52c250c7f688788471c40131..cb0c21d384c066ec1441b346810355113dfa7bab 100644 (file)
@@ -783,7 +783,7 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
 
        desc->chip->ack(irq);
 
-       bank = (struct gpio_bank *) desc->data;
+       bank = get_irq_data(irq);
        if (bank->method == METHOD_MPUIO)
                isr_reg = bank->base + OMAP_MPUIO_GPIO_INT;
 #ifdef CONFIG_ARCH_OMAP15XX
index d2f9759cd3ed12ed1dbeff4d4c30fbab37145b6e..9b66271d3ba82feefd4104f59473b4c3f53f95cc 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/interrupt.h>
 #include <linux/module.h>
 #include <linux/slab.h>
-//#include <asm/irq.h>
+#include <linux/irq.h>
 
 #include <asm/arch/sharpsl.h>
 #include <asm/arch/hardware.h>
index 888358fac59843dc68e0f884ab652e4d998ae260..ecaa132fa5924aefd4ef7b0e8d4dc2ee5bc6c0b7 100644 (file)
 #include <linux/timer.h>
 #include <linux/mm.h>
 #include <linux/interrupt.h>
+#include <linux/irq.h>
 #include <linux/spinlock.h>
 #include <linux/cpufreq.h>
 
 #include <asm/hardware.h>
 #include <asm/io.h>
-#include <asm/irq.h>
 #include <asm/system.h>
 
 #include "soc_common.h"
diff --git a/include/asm-arm/dyntick.h b/include/asm-arm/dyntick.h
new file mode 100644 (file)
index 0000000..19fab2d
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASMARM_DYNTICK_H
+#define _ASMARM_DYNTICK_H
+
+#include <asm/mach/time.h>
+
+#endif /* _ASMARM_DYNTICK_H */
diff --git a/include/asm-arm/hw_irq.h b/include/asm-arm/hw_irq.h
new file mode 100644 (file)
index 0000000..f1a08a5
--- /dev/null
@@ -0,0 +1,9 @@
+/*
+ * Nothing to see here yet
+ */
+#ifndef _ARCH_ARM_HW_IRQ_H
+#define _ARCH_ARM_HW_IRQ_H
+
+#include <asm/mach/irq.h>
+
+#endif
index 66e67e60bc563af489fbd1d16d04e2560d65bbbf..283af50a16cb359e7ee0709a0d81efb982cc952f 100644 (file)
 
 struct irqaction;
 
-extern void disable_irq_nosync(unsigned int);
-extern void disable_irq(unsigned int);
-extern void enable_irq(unsigned int);
-
 /*
- * These correspond with the SA_TRIGGER_* defines, and therefore the
- * IORESOURCE_IRQ_* defines.
+ * Migration helpers
  */
-#define __IRQT_RISEDGE (1 << 0)
-#define __IRQT_FALEDGE (1 << 1)
-#define __IRQT_HIGHLVL (1 << 2)
-#define __IRQT_LOWLVL  (1 << 3)
+#define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING
+#define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING
+#define __IRQT_LOWLVL  IRQ_TYPE_LEVEL_LOW
+#define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH
 
 #define IRQT_NOEDGE    (0)
 #define IRQT_RISING    (__IRQT_RISEDGE)
@@ -40,12 +35,7 @@ extern void enable_irq(unsigned int);
 #define IRQT_BOTHEDGE  (__IRQT_RISEDGE|__IRQT_FALEDGE)
 #define IRQT_LOW       (__IRQT_LOWLVL)
 #define IRQT_HIGH      (__IRQT_HIGHLVL)
-#define IRQT_PROBE     (1 << 4)
-
-int set_irq_type(unsigned int irq, unsigned int type);
-void disable_irq_wake(unsigned int irq);
-void enable_irq_wake(unsigned int irq);
-int setup_irq(unsigned int, struct irqaction *);
+#define IRQT_PROBE     IRQ_TYPE_PROBE
 
 extern void migrate_irqs(void);
 #endif
index d4d420ecf3a826c37293fad7406a8cf9354bb5c8..131f33733d25597167f4d67462a032455920f5d4 100644 (file)
 #ifndef __ASM_ARM_MACH_IRQ_H
 #define __ASM_ARM_MACH_IRQ_H
 
-struct irqdesc;
-struct pt_regs;
-struct seq_file;
-
-typedef void (*irq_handler_t)(unsigned int, struct irqdesc *, struct pt_regs *);
-typedef void (*irq_control_t)(unsigned int);
-
-struct irqchip {
-       /*
-        * Acknowledge the IRQ.
-        * If this is a level-based IRQ, then it is expected to mask the IRQ
-        * as well.
-        */
-       void (*ack)(unsigned int);
-       /*
-        * Mask the IRQ in hardware.
-        */
-       void (*mask)(unsigned int);
-       /*
-        * Unmask the IRQ in hardware.
-        */
-       void (*unmask)(unsigned int);
-       /*
-        * Ask the hardware to re-trigger the IRQ.
-        * Note: This method _must_ _not_ call the interrupt handler.
-        * If you are unable to retrigger the interrupt, do not
-        * provide a function, or if you do, return non-zero.
-        */
-       int (*retrigger)(unsigned int);
-       /*
-        * Set the type of the IRQ.
-        */
-       int (*set_type)(unsigned int, unsigned int);
-       /*
-        * Set wakeup-enable on the selected IRQ
-        */
-       int (*set_wake)(unsigned int, unsigned int);
-
-#ifdef CONFIG_SMP
-       /*
-        * Route an interrupt to a CPU
-        */
-       void (*set_cpu)(struct irqdesc *desc, unsigned int irq, unsigned int cpu);
-#endif
-};
-
-struct irqdesc {
-       irq_handler_t   handle;
-       struct irqchip  *chip;
-       struct irqaction *action;
-       struct list_head pend;
-       void __iomem    *base;
-       void            *data;
-       unsigned int    disable_depth;
-
-       unsigned int    triggered: 1;           /* IRQ has occurred           */
-       unsigned int    running  : 1;           /* IRQ is running             */
-       unsigned int    pending  : 1;           /* IRQ is pending             */
-       unsigned int    probing  : 1;           /* IRQ in use for a probe     */
-       unsigned int    probe_ok : 1;           /* IRQ can be used for probe  */
-       unsigned int    valid    : 1;           /* IRQ claimable              */
-       unsigned int    noautoenable : 1;       /* don't automatically enable IRQ */
-       unsigned int    unused   :25;
-
-       unsigned int    irqs_unhandled;
-       struct proc_dir_entry *procdir;
-
-#ifdef CONFIG_SMP
-       cpumask_t       affinity;
-       unsigned int    cpu;
-#endif
-
-       /*
-        * IRQ lock detection
-        */
-       unsigned int    lck_cnt;
-       unsigned int    lck_pc;
-       unsigned int    lck_jif;
-};
-
-extern struct irqdesc irq_desc[];
+#include <linux/irq.h>
 
-/*
- * Helpful inline function for calling irq descriptor handlers.
- */
-static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
-{
-       desc->handle(irq, desc, regs);
-}
+struct seq_file;
 
 /*
  * This is internal.  Do not use it.
@@ -106,18 +20,22 @@ static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struc
 extern void (*init_arch_irq)(void);
 extern void init_FIQ(void);
 extern int show_fiq_list(struct seq_file *, void *);
-void __set_irq_handler(unsigned int irq, irq_handler_t, int);
 
 /*
- * External stuff.
+ * Function wrappers
+ */
+#define set_irq_chipdata(irq, d)       set_irq_chip_data(irq, d)
+#define get_irq_chipdata(irq)          get_irq_chip_data(irq)
+
+/*
+ * Obsolete inline function for calling irq descriptor handlers.
  */
-#define set_irq_handler(irq,handler)           __set_irq_handler(irq,handler,0)
-#define set_irq_chained_handler(irq,handler)   __set_irq_handler(irq,handler,1)
-#define set_irq_data(irq,d)                    do { irq_desc[irq].data = d; } while (0)
-#define set_irq_chipdata(irq,d)                        do { irq_desc[irq].base = d; } while (0)
-#define get_irq_chipdata(irq)                  (irq_desc[irq].base)
+static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc,
+                                  struct pt_regs *regs)
+{
+       desc->handle_irq(irq, desc, regs);
+}
 
-void set_irq_chip(unsigned int irq, struct irqchip *);
 void set_irq_flags(unsigned int irq, unsigned int flags);
 
 #define IRQF_VALID     (1 << 0)
@@ -125,12 +43,25 @@ void set_irq_flags(unsigned int irq, unsigned int flags);
 #define IRQF_NOAUTOEN  (1 << 2)
 
 /*
- * Built-in IRQ handlers.
+ * This is for easy migration, but should be changed in the source
  */
-void do_level_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
-void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
-void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
-void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs);
-void dummy_mask_unmask_irq(unsigned int irq);
+#define do_level_IRQ   handle_level_irq
+#define do_edge_IRQ    handle_edge_irq
+#define do_simple_IRQ  handle_simple_irq
+#define irqdesc                irq_desc
+#define irqchip                irq_chip
+
+#define do_bad_IRQ(irq,desc,regs)                      \
+do {                                                   \
+       spin_lock(&desc->lock);                         \
+       handle_bad_irq(irq, desc, regs);                \
+       spin_unlock(&desc->lock);                       \
+} while(0)
+
+extern unsigned long irq_err_count;
+static inline void ack_bad_irq(int irq)
+{
+       irq_err_count++;
+}
 
 #endif
index ae1e422f18e3dc97f5278c396e40faef61048c40..95d7aa7954d20b8aa706567e7eee52e391da8b00 100644 (file)
@@ -347,8 +347,9 @@ extern int noirqdebug_setup(char *str);
 /* Checks whether the interrupt can be requested by request_irq(): */
 extern int can_request_irq(unsigned int irq, unsigned long irqflags);
 
-/* Dummy irq-chip implementation: */
+/* Dummy irq-chip implementations: */
 extern struct irq_chip no_irq_chip;
+extern struct irq_chip dummy_irq_chip;
 
 extern void
 set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
index 4a0952d9458b481f12abd61133dbd38e57a33573..54105bdfe20de4609c9f62c6f901e5f0ce658f08 100644 (file)
@@ -462,9 +462,18 @@ __set_irq_handler(unsigned int irq,
        if (!handle)
                handle = handle_bad_irq;
 
-       if (is_chained && desc->chip == &no_irq_chip)
-               printk(KERN_WARNING "Trying to install "
-                      "chained interrupt type for IRQ%d\n", irq);
+       if (desc->chip == &no_irq_chip) {
+               printk(KERN_WARNING "Trying to install %sinterrupt handler "
+                      "for IRQ%d\n", is_chained ? "chained " : " ", irq);
+               /*
+                * Some ARM implementations install a handler for really dumb
+                * interrupt hardware without setting an irq_chip. This worked
+                * with the ARM no_irq_chip but the check in setup_irq would
+                * prevent us to setup the interrupt at all. Switch it to
+                * dummy_irq_chip for easy transition.
+                */
+               desc->chip = &dummy_irq_chip;
+       }
 
        spin_lock_irqsave(&desc->lock, flags);
 
index 6070e046469018521279fb93c4466cffaa88790e..6d8b30114961a46669455b7e5721319751e94744 100644 (file)
 #include <linux/interrupt.h>
 #include <linux/kernel_stat.h>
 
+#if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM)
+#include <asm/dyntick.h>
+#endif
+
 #include "internals.h"
 
 /**
@@ -91,6 +95,22 @@ struct irq_chip no_irq_chip = {
        .end            = noop,
 };
 
+/*
+ * Generic dummy implementation which can be used for
+ * real dumb interrupt sources
+ */
+struct irq_chip dummy_irq_chip = {
+       .name           = "dummy",
+       .startup        = noop_ret,
+       .shutdown       = noop,
+       .enable         = noop,
+       .disable        = noop,
+       .ack            = noop,
+       .mask           = noop,
+       .unmask         = noop,
+       .end            = noop,
+};
+
 /*
  * Special, empty irq handler:
  */
@@ -113,6 +133,15 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
        irqreturn_t ret, retval = IRQ_NONE;
        unsigned int status = 0;
 
+#if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM)
+       if (!(action->flags & SA_TIMER) && system_timer->dyn_tick != NULL) {
+               write_seqlock(&xtime_lock);
+               if (system_timer->dyn_tick->state & DYN_TICK_ENABLED)
+                       system_timer->dyn_tick->handler(irq, 0, regs);
+               write_sequnlock(&xtime_lock);
+       }
+#endif
+
        if (!(action->flags & IRQF_DISABLED))
                local_irq_enable();