Commit b4b90341 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'genirq' of master.kernel.org:/home/rmk/linux-2.6-arm

* '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).
parents a8c4c20d 07d265dd
...@@ -47,6 +47,18 @@ config MCA ...@@ -47,6 +47,18 @@ config MCA
<file:Documentation/mca.txt> (and especially the web page given <file:Documentation/mca.txt> (and especially the web page given
there) before attempting to build an MCA bus kernel. 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 config RWSEM_GENERIC_SPINLOCK
bool bool
default y default y
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
static void __iomem *gic_dist_base; static void __iomem *gic_dist_base;
static void __iomem *gic_cpu_base; static void __iomem *gic_cpu_base;
static DEFINE_SPINLOCK(irq_controller_lock);
/* /*
* Routines to acknowledge, disable and enable interrupts * Routines to acknowledge, disable and enable interrupts
...@@ -52,32 +53,45 @@ static void __iomem *gic_cpu_base; ...@@ -52,32 +53,45 @@ static void __iomem *gic_cpu_base;
static void gic_ack_irq(unsigned int irq) static void gic_ack_irq(unsigned int irq)
{ {
u32 mask = 1 << (irq % 32); u32 mask = 1 << (irq % 32);
spin_lock(&irq_controller_lock);
writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4); writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4);
writel(irq, gic_cpu_base + GIC_CPU_EOI); writel(irq, gic_cpu_base + GIC_CPU_EOI);
spin_unlock(&irq_controller_lock);
} }
static void gic_mask_irq(unsigned int irq) static void gic_mask_irq(unsigned int irq)
{ {
u32 mask = 1 << (irq % 32); u32 mask = 1 << (irq % 32);
spin_lock(&irq_controller_lock);
writel(mask, gic_dist_base + GIC_DIST_ENABLE_CLEAR + (irq / 32) * 4); 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) static void gic_unmask_irq(unsigned int irq)
{ {
u32 mask = 1 << (irq % 32); u32 mask = 1 << (irq % 32);
spin_lock(&irq_controller_lock);
writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4); writel(mask, gic_dist_base + GIC_DIST_ENABLE_SET + (irq / 32) * 4);
spin_unlock(&irq_controller_lock);
} }
#ifdef CONFIG_SMP #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); void __iomem *reg = gic_dist_base + GIC_DIST_TARGET + (irq & ~3);
unsigned int shift = (irq % 4) * 8; unsigned int shift = (irq % 4) * 8;
unsigned int cpu = first_cpu(mask_val);
u32 val; u32 val;
spin_lock(&irq_controller_lock);
irq_desc[irq].cpu = cpu;
val = readl(reg) & ~(0xff << shift); val = readl(reg) & ~(0xff << shift);
val |= 1 << (cpu + shift); val |= 1 << (cpu + shift);
writel(val, reg); writel(val, reg);
spin_unlock(&irq_controller_lock);
} }
#endif #endif
...@@ -86,7 +100,7 @@ static struct irqchip gic_chip = { ...@@ -86,7 +100,7 @@ static struct irqchip gic_chip = {
.mask = gic_mask_irq, .mask = gic_mask_irq,
.unmask = gic_unmask_irq, .unmask = gic_unmask_irq,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
.set_cpu = gic_set_cpu, .set_affinity = gic_set_cpu,
#endif #endif
}; };
......
...@@ -150,7 +150,7 @@ static void ...@@ -150,7 +150,7 @@ static void
sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs)
{ {
unsigned int stat0, stat1, i; unsigned int stat0, stat1, i;
void __iomem *base = desc->data; void __iomem *base = get_irq_data(irq);
stat0 = sa1111_readl(base + SA1111_INTSTATCLR0); stat0 = sa1111_readl(base + SA1111_INTSTATCLR0);
stat1 = sa1111_readl(base + SA1111_INTSTATCLR1); stat1 = sa1111_readl(base + SA1111_INTSTATCLR1);
...@@ -168,11 +168,11 @@ sa1111_irq_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs) ...@@ -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) for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1)
if (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) for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1)
if (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 */ /* For level-based interrupts */
desc->chip->unmask(irq); desc->chip->unmask(irq);
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/timex.h> #include <linux/timex.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -619,7 +619,7 @@ ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg ...@@ -619,7 +619,7 @@ ecard_irqexp_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *reg
ecard_t *ec = slot_to_ecard(slot); ecard_t *ec = slot_to_ecard(slot);
if (ec->claimed) { 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 * this ugly code is so that we can operate a
* prioritorising system: * prioritorising system:
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/seq_file.h> #include <linux/seq_file.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
......
This diff is collapsed.
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/time.h> #include <linux/time.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h>
#include <asm/mach/time.h> #include <asm/mach/time.h>
static unsigned long last_crtr; static unsigned long last_crtr;
......
...@@ -10,12 +10,13 @@ ...@@ -10,12 +10,13 @@
*/ */
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/module.h> #include <linux/module.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/mach/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/arch/gpio.h> #include <asm/arch/gpio.h>
...@@ -340,7 +341,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs ...@@ -340,7 +341,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
void __iomem *pio; void __iomem *pio;
u32 isr; u32 isr;
pio = desc->base; pio = get_irq_chip_data(irq);
/* temporarily mask (level sensitive) parent IRQ */ /* temporarily mask (level sensitive) parent IRQ */
desc->chip->ack(irq); desc->chip->ack(irq);
...@@ -350,12 +351,12 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs ...@@ -350,12 +351,12 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
if (!isr) if (!isr)
break; break;
pin = (unsigned) desc->data; pin = (unsigned) get_irq_data(irq);
gpio = &irq_desc[pin]; gpio = &irq_desc[pin];
while (isr) { while (isr) {
if (isr & 1) { if (isr & 1) {
if (unlikely(gpio->disable_depth)) { if (unlikely(gpio->depth)) {
/* /*
* The core ARM interrupt handler lazily disables IRQs so * The core ARM interrupt handler lazily disables IRQs so
* another IRQ must be generated before it actually gets * 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 ...@@ -364,7 +365,7 @@ static void gpio_irq_handler(unsigned irq, struct irqdesc *desc, struct pt_regs
gpio_irq_mask(pin); gpio_irq_mask(pin);
} }
else else
gpio->handle(pin, gpio, regs); desc_handle_irq(pin, gpio, regs);
} }
pin++; pin++;
gpio++; gpio++;
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/timex.h> #include <linux/timex.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/hardware.h> #include <asm/hardware.h>
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/types.h> #include <linux/types.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/init.h> #include <linux/init.h>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <asm/irq.h> #include <asm/irq.h>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h> #include <asm/irq.h>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/time.h> #include <linux/time.h>
#include <asm/hardware.h> #include <asm/hardware.h>
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/termios.h> #include <linux/termios.h>
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/bitops.h> #include <linux/bitops.h>
...@@ -408,7 +409,7 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, str ...@@ -408,7 +409,7 @@ static void ixp2000_err_irq_handler(unsigned int irq, struct irqdesc *desc, str
for(i = 31; i >= 0; i--) { for(i = 31; i >= 0; i--) {
if(status & (1 << i)) { if(status & (1 << i)) {
desc = irq_desc + IRQ_IXP2000_DRAM0_MIN_ERR + 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);
} }
} }
} }
......
...@@ -167,7 +167,7 @@ void ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long ...@@ -167,7 +167,7 @@ void ixdp2x00_init_irq(volatile unsigned long *stat_reg, volatile unsigned long
} }
/* Hook into PCI interrupt */ /* Hook into PCI interrupt */
set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x00_irq_handler); set_irq_chained_handler(IRQ_IXP2000_PCIB, ixdp2x00_irq_handler);
} }
/************************************************************************* /*************************************************************************
......
...@@ -127,7 +127,7 @@ void __init ixdp2x01_init_irq(void) ...@@ -127,7 +127,7 @@ void __init ixdp2x01_init_irq(void)
} }
/* Hook into PCI interrupts */ /* Hook into PCI interrupts */
set_irq_chained_handler(IRQ_IXP2000_PCIB, &ixdp2x01_irq_handler); set_irq_chained_handler(IRQ_IXP2000_PCIB, ixdp2x01_irq_handler);
} }
......
...@@ -271,7 +271,7 @@ static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs * ...@@ -271,7 +271,7 @@ static void pci_handler(unsigned int irq, struct irqdesc *desc, struct pt_regs *
} }
int_desc = irq_desc + irqno; int_desc = irq_desc + irqno;
int_desc->handle(irqno, int_desc, regs); desc_handle_irq(irqno, int_desc, regs);
desc->chip->unmask(irq); desc->chip->unmask(irq);
} }
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/bitops.h> #include <linux/bitops.h>
...@@ -36,7 +37,6 @@ ...@@ -36,7 +37,6 @@
#include <asm/memory.h> #include <asm/memory.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/pgtable.h> #include <asm/pgtable.h>
...@@ -74,7 +74,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct ...@@ -74,7 +74,7 @@ static void ixdp2351_inta_handler(unsigned int irq, struct irqdesc *desc, struct
int cpld_irq = int cpld_irq =
IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i); IXP23XX_MACH_IRQ(IXDP2351_INTA_IRQ_BASE + i);
cpld_desc = irq_desc + cpld_irq; 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 ...@@ -111,7 +111,7 @@ static void ixdp2351_intb_handler(unsigned int irq, struct irqdesc *desc, struct
int cpld_irq = int cpld_irq =
IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i); IXP23XX_MACH_IRQ(IXDP2351_INTB_IRQ_BASE + i);
cpld_desc = irq_desc + cpld_irq; 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) ...@@ -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_INTA, ixdp2351_inta_handler);
set_irq_chained_handler(IRQ_IXP23XX_INTB, &ixdp2351_intb_handler); set_irq_chained_handler(IRQ_IXP23XX_INTB, ixdp2351_intb_handler);
} }
/* /*
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware.h> #include <asm/hardware.h>
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <asm/mach/pci.h> #include <asm/mach/pci.h>
......
...@@ -16,10 +16,10 @@ ...@@ -16,10 +16,10 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach/pci.h> #include <asm/mach/pci.h>
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h>
#include <asm/mach/pci.h> #include <asm/mach/pci.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
......
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
* *
*/ */
#include <linux/module.h>
#include <linux/reboot.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/module.h>
#include <linux/reboot.h> #include <linux/reboot.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
*/ */
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h>
#include <linux/device.h> #include <linux/device.h>
#include <asm/types.h> #include <asm/types.h>
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/setup.h> #include <asm/setup.h>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/time.h> #include <linux/time.h>
#include <asm/hardware.h> #include <asm/hardware.h>
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/interrupt.h> #include <linux/irq.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/tty.h> #include <linux/tty.h>
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/fb.h> #include <linux/fb.h>
......
...@@ -18,11 +18,11 @@ ...@@ -18,11 +18,11 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/irq.h>
#include <asm/apm.h> #include <asm/apm.h>
#include <asm/arch/pm.h> #include <asm/arch/pm.h>
#include <asm/arch/pxa-regs.h> #include <asm/arch/pxa-regs.h>
......
...@@ -136,8 +136,8 @@ bast_irq_pc104_demux(unsigned int irq, ...@@ -136,8 +136,8 @@ bast_irq_pc104_demux(unsigned int irq,
for (i = 0; stat != 0; i++, stat >>= 1) { for (i = 0; stat != 0; i++, stat >>= 1) {
if (stat & 1) { if (stat & 1) {
irqno = bast_pc104_irqs[i]; irqno = bast_pc104_irqs[i];
desc = irq_desc + irqno;
desc_handle_irq(irqno, irq_desc + irqno, regs); desc_handle_irq(irqno, desc, regs);
} }
} }
} }
...@@ -156,7 +156,7 @@ static __init int bast_irq_init(void) ...@@ -156,7 +156,7 @@ static __init int bast_irq_init(void)
set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux); set_irq_chained_handler(IRQ_ISA, bast_irq_pc104_demux);
/* reigster our IRQs */ /* register our IRQs */
for (i = 0; i < 4; i++) { for (i = 0; i < 4; i++) {
unsigned int irqno = bast_pc104_irqs[i]; unsigned int irqno = bast_pc104_irqs[i];
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/clk.h> #include <linux/clk.h>
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/irq.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
......
...@@ -835,7 +835,7 @@ static void __init h3800_init_irq(void) ...@@ -835,7 +835,7 @@ static void __init h3800_init_irq(void)
} }
#endif #endif
set_irq_type(IRQ_GPIO_H3800_ASIC, IRQT_RISING); 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);
} }
......
...@@ -11,12 +11,13 @@ ...@@ -11,12 +11,13 @@
*/ */
#include <linux/init.h> #include <linux/init.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/sysdev.h> #include <linux/sysdev.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
#include "generic.h" #include "generic.h"
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/irq.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/timex.h> #include <linux/timex.h>
#include <linux/signal.h> #include <linux/signal.h>
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <linux/serial_8250.h> #include <linux/serial_8250.h>
......
...@@ -24,9 +24,9 @@ ...@@ -24,9 +24,9 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <asm/system.h> #include <asm/system.h>
#include <asm/irq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/dma.h> #include <asm/dma.h>
#include <asm/io.h> #include <asm/io.h>
......
...@@ -783,7 +783,7 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc, ...@@ -783,7 +783,7 @@ static void gpio_irq_handler(unsigned int irq, struct irqdesc *desc,
desc->chip->ack(irq); desc->chip->ack(irq);
bank = (struct gpio_bank *) desc->data; bank = get_irq_data(irq);
if (bank->method == METHOD_MPUIO) if (bank->method == METHOD_MPUIO)
isr_reg = bank->base + OMAP_MPUIO_GPIO_INT; isr_reg = bank->base + OMAP_MPUIO_GPIO_INT;
#ifdef CONFIG_ARCH_OMAP15XX #ifdef CONFIG_ARCH_OMAP15XX
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/slab.h> #include <linux/slab.h>
//#include <asm/irq.h> #include <linux/irq.h>
#include <asm/arch/sharpsl.h> #include <asm/arch/sharpsl.h>
#include <asm/arch/hardware.h> #include <asm/arch/hardware.h>
......
...@@ -38,12 +38,12 @@ ...@@ -38,12 +38,12 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/mm.h> #include <linux/mm.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/io.h> #include <asm/io.h>
#include <asm/irq.h>
#include <asm/system.h> #include <asm/system.h>
#include "soc_common.h" #include "soc_common.h"
......
#ifndef _ASMARM_DYNTICK_H
#define _ASMARM_DYNTICK_H
#include <asm/mach/time.h>
#endif /* _ASMARM_DYNTICK_H */
/*
* Nothing to see here yet
*/
#ifndef _ARCH_ARM_HW_IRQ_H
#define _ARCH_ARM_HW_IRQ_H
#include <asm/mach/irq.h>
#endif
...@@ -21,18 +21,13 @@ ...@@ -21,18 +21,13 @@
struct irqaction; 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 * Migration helpers
* IORESOURCE_IRQ_* defines.
*/ */
#define __IRQT_RISEDGE (1 << 0) #define __IRQT_FALEDGE IRQ_TYPE_EDGE_FALLING
#define __IRQT_FALEDGE (1 << 1) #define __IRQT_RISEDGE IRQ_TYPE_EDGE_RISING
#define __IRQT_HIGHLVL (1 << 2) #define __IRQT_LOWLVL IRQ_TYPE_LEVEL_LOW
#define __IRQT_LOWLVL (1 << 3) #define __IRQT_HIGHLVL IRQ_TYPE_LEVEL_HIGH
#define IRQT_NOEDGE (0) #define IRQT_NOEDGE (0)
#define IRQT_RISING (__IRQT_RISEDGE) #define IRQT_RISING (__IRQT_RISEDGE)
...@@ -40,12 +35,7 @@ extern void enable_irq(unsigned int); ...@@ -40,12 +35,7 @@ extern void enable_irq(unsigned int);
#define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE) #define IRQT_BOTHEDGE (__IRQT_RISEDGE|__IRQT_FALEDGE)
#define IRQT_LOW (__IRQT_LOWLVL) #define IRQT_LOW (__IRQT_LOWLVL)
#define IRQT_HIGH (__IRQT_HIGHLVL) #define IRQT_HIGH (__IRQT_HIGHLVL)
#define IRQT_PROBE (1 << 4) #define IRQT_PROBE IRQ_TYPE_PROBE
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 *);
extern void migrate_irqs(void); extern void migrate_irqs(void);
#endif #endif
......
...@@ -10,95 +10,9 @@ ...@@ -10,95 +10,9 @@
#ifndef __ASM_ARM_MACH_IRQ_H #ifndef __ASM_ARM_MACH_IRQ_H
#define __ASM_ARM_MACH_IRQ_H #define __ASM_ARM_MACH_IRQ_H
struct irqdesc; #include <linux/irq.h>
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[];
/* struct seq_file;
* 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);
}
/* /*
* This is internal. Do not use it. * This is internal. Do not use it.
...@@ -106,18 +20,22 @@ static inline void desc_handle_irq(unsigned int irq, struct irqdesc *desc, struc ...@@ -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_arch_irq)(void);
extern void init_FIQ(void); extern void init_FIQ(void);
extern int show_fiq_list(struct seq_file *, 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) static inline void desc_handle_irq(unsigned int irq, struct irq_desc *desc,
#define set_irq_chained_handler(irq,handler) __set_irq_handler(irq,handler,1) struct pt_regs *regs)
#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) desc->handle_irq(irq, desc, regs);
#define get_irq_chipdata(irq) (irq_desc[irq].base) }
void set_irq_chip(unsigned int irq, struct irqchip *);
void set_irq_flags(unsigned int irq, unsigned int flags); void set_irq_flags(unsigned int irq, unsigned int flags);
#define IRQF_VALID (1 << 0) #define IRQF_VALID (1 << 0)
...@@ -125,12 +43,25 @@ void set_irq_flags(unsigned int irq, unsigned int flags); ...@@ -125,12 +43,25 @@ void set_irq_flags(unsigned int irq, unsigned int flags);
#define IRQF_NOAUTOEN (1 << 2) #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); #define do_level_IRQ handle_level_irq
void do_edge_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); #define do_edge_IRQ handle_edge_irq
void do_simple_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); #define do_simple_IRQ handle_simple_irq
void do_bad_IRQ(unsigned int irq, struct irqdesc *desc, struct pt_regs *regs); #define irqdesc irq_desc
void dummy_mask_unmask_irq(unsigned int irq); #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 #endif
...@@ -347,8 +347,9 @@ extern int noirqdebug_setup(char *str); ...@@ -347,8 +347,9 @@ extern int noirqdebug_setup(char *str);
/* Checks whether the interrupt can be requested by request_irq(): */ /* Checks whether the interrupt can be requested by request_irq(): */
extern int can_request_irq(unsigned int irq, unsigned long irqflags); 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 no_irq_chip;
extern struct irq_chip dummy_irq_chip;
extern void extern void
set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip, set_irq_chip_and_handler(unsigned int irq, struct irq_chip *chip,
......
...@@ -462,9 +462,18 @@ __set_irq_handler(unsigned int irq, ...@@ -462,9 +462,18 @@ __set_irq_handler(unsigned int irq,
if (!handle) if (!handle)
handle = handle_bad_irq; handle = handle_bad_irq;
if (is_chained && desc->chip == &no_irq_chip) if (desc->chip == &no_irq_chip) {
printk(KERN_WARNING "Trying to install " printk(KERN_WARNING "Trying to install %sinterrupt handler "
"chained interrupt type for IRQ%d\n", irq); "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); spin_lock_irqsave(&desc->lock, flags);
......
...@@ -16,6 +16,10 @@ ...@@ -16,6 +16,10 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/kernel_stat.h> #include <linux/kernel_stat.h>
#if defined(CONFIG_NO_IDLE_HZ) && defined(CONFIG_ARM)
#include <asm/dyntick.h>
#endif
#include "internals.h" #include "internals.h"
/** /**
...@@ -91,6 +95,22 @@ struct irq_chip no_irq_chip = { ...@@ -91,6 +95,22 @@ struct irq_chip no_irq_chip = {
.end = noop, .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: * Special, empty irq handler:
*/ */
...@@ -113,6 +133,15 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs, ...@@ -113,6 +133,15 @@ irqreturn_t handle_IRQ_event(unsigned int irq, struct pt_regs *regs,
irqreturn_t ret, retval = IRQ_NONE; irqreturn_t ret, retval = IRQ_NONE;
unsigned int status = 0; 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)) if (!(action->flags & IRQF_DISABLED))
local_irq_enable(); local_irq_enable();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment