Commit 495e0c79 authored by Thomas Gleixner's avatar Thomas Gleixner

xtensa: Convert main irq_chip to new functions

Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Chris Zankel <chris@zankel.net>
LKML-Reference: <20110206211137.653005586@linutronix.de>
parent df31a0a0
...@@ -35,7 +35,6 @@ atomic_t irq_err_count; ...@@ -35,7 +35,6 @@ atomic_t irq_err_count;
asmlinkage void do_IRQ(int irq, struct pt_regs *regs) asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
{ {
struct pt_regs *old_regs = set_irq_regs(regs); struct pt_regs *old_regs = set_irq_regs(regs);
struct irq_desc *desc = irq_desc + irq;
if (irq >= NR_IRQS) { if (irq >= NR_IRQS) {
printk(KERN_EMERG "%s: cannot handle IRQ %d\n", printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
...@@ -57,7 +56,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs) ...@@ -57,7 +56,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
sp - sizeof(struct thread_info)); sp - sizeof(struct thread_info));
} }
#endif #endif
desc->handle_irq(irq, desc); generic_handle_irq(irq);
irq_exit(); irq_exit();
set_irq_regs(old_regs); set_irq_regs(old_regs);
...@@ -111,50 +110,50 @@ int show_interrupts(struct seq_file *p, void *v) ...@@ -111,50 +110,50 @@ int show_interrupts(struct seq_file *p, void *v)
return 0; return 0;
} }
static void xtensa_irq_mask(unsigned int irq) static void xtensa_irq_mask(struct irq_chip *d)
{ {
cached_irq_mask &= ~(1 << irq); cached_irq_mask &= ~(1 << d->irq);
set_sr (cached_irq_mask, INTENABLE); set_sr (cached_irq_mask, INTENABLE);
} }
static void xtensa_irq_unmask(unsigned int irq) static void xtensa_irq_unmask(struct irq_chip *d)
{ {
cached_irq_mask |= 1 << irq; cached_irq_mask |= 1 << d->irq;
set_sr (cached_irq_mask, INTENABLE); set_sr (cached_irq_mask, INTENABLE);
} }
static void xtensa_irq_enable(unsigned int irq) static void xtensa_irq_enable(struct irq_chip *d)
{ {
variant_irq_enable(irq); variant_irq_enable(d->irq);
xtensa_irq_unmask(irq); xtensa_irq_unmask(d->irq);
} }
static void xtensa_irq_disable(unsigned int irq) static void xtensa_irq_disable(struct irq_chip *d)
{ {
xtensa_irq_mask(irq); xtensa_irq_mask(d->irq);
variant_irq_disable(irq); variant_irq_disable(d->irq);
} }
static void xtensa_irq_ack(unsigned int irq) static void xtensa_irq_ack(struct irq_chip *d)
{ {
set_sr(1 << irq, INTCLEAR); set_sr(1 << d->irq, INTCLEAR);
} }
static int xtensa_irq_retrigger(unsigned int irq) static int xtensa_irq_retrigger(struct irq_chip *d)
{ {
set_sr (1 << irq, INTSET); set_sr (1 << d->irq, INTSET);
return 1; return 1;
} }
static struct irq_chip xtensa_irq_chip = { static struct irq_chip xtensa_irq_chip = {
.name = "xtensa", .name = "xtensa",
.enable = xtensa_irq_enable, .irq_enable = xtensa_irq_enable,
.disable = xtensa_irq_disable, .irq_disable = xtensa_irq_disable,
.mask = xtensa_irq_mask, .irq_mask = xtensa_irq_mask,
.unmask = xtensa_irq_unmask, .irq_unmask = xtensa_irq_unmask,
.ack = xtensa_irq_ack, .irq_ack = xtensa_irq_ack,
.retrigger = xtensa_irq_retrigger, .irq_retrigger = xtensa_irq_retrigger,
}; };
void __init init_IRQ(void) void __init init_IRQ(void)
......
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