aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/kernel
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-06 16:10:52 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-03-24 15:35:58 -0400
commit495e0c79406fc0915fe80c7b1bbc006ef1370842 (patch)
treeea3605cef6958001daab08cd381c8da33e84b656 /arch/xtensa/kernel
parentdf31a0a06f00a9b54a5cd4eaef59ebc6ca629b78 (diff)
xtensa: Convert main irq_chip to new functions
Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Chris Zankel <chris@zankel.net> LKML-Reference: <20110206211137.653005586@linutronix.de>
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r--arch/xtensa/kernel/irq.c43
1 files changed, 21 insertions, 22 deletions
diff --git a/arch/xtensa/kernel/irq.c b/arch/xtensa/kernel/irq.c
index 87508886cbbd..8438319b14d7 100644
--- a/arch/xtensa/kernel/irq.c
+++ b/arch/xtensa/kernel/irq.c
@@ -35,7 +35,6 @@ atomic_t irq_err_count;
35asmlinkage void do_IRQ(int irq, struct pt_regs *regs) 35asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
36{ 36{
37 struct pt_regs *old_regs = set_irq_regs(regs); 37 struct pt_regs *old_regs = set_irq_regs(regs);
38 struct irq_desc *desc = irq_desc + irq;
39 38
40 if (irq >= NR_IRQS) { 39 if (irq >= NR_IRQS) {
41 printk(KERN_EMERG "%s: cannot handle IRQ %d\n", 40 printk(KERN_EMERG "%s: cannot handle IRQ %d\n",
@@ -57,7 +56,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
57 sp - sizeof(struct thread_info)); 56 sp - sizeof(struct thread_info));
58 } 57 }
59#endif 58#endif
60 desc->handle_irq(irq, desc); 59 generic_handle_irq(irq);
61 60
62 irq_exit(); 61 irq_exit();
63 set_irq_regs(old_regs); 62 set_irq_regs(old_regs);
@@ -111,50 +110,50 @@ skip:
111 return 0; 110 return 0;
112} 111}
113 112
114static void xtensa_irq_mask(unsigned int irq) 113static void xtensa_irq_mask(struct irq_chip *d)
115{ 114{
116 cached_irq_mask &= ~(1 << irq); 115 cached_irq_mask &= ~(1 << d->irq);
117 set_sr (cached_irq_mask, INTENABLE); 116 set_sr (cached_irq_mask, INTENABLE);
118} 117}
119 118
120static void xtensa_irq_unmask(unsigned int irq) 119static void xtensa_irq_unmask(struct irq_chip *d)
121{ 120{
122 cached_irq_mask |= 1 << irq; 121 cached_irq_mask |= 1 << d->irq;
123 set_sr (cached_irq_mask, INTENABLE); 122 set_sr (cached_irq_mask, INTENABLE);
124} 123}
125 124
126static void xtensa_irq_enable(unsigned int irq) 125static void xtensa_irq_enable(struct irq_chip *d)
127{ 126{
128 variant_irq_enable(irq); 127 variant_irq_enable(d->irq);
129 xtensa_irq_unmask(irq); 128 xtensa_irq_unmask(d->irq);
130} 129}
131 130
132static void xtensa_irq_disable(unsigned int irq) 131static void xtensa_irq_disable(struct irq_chip *d)
133{ 132{
134 xtensa_irq_mask(irq); 133 xtensa_irq_mask(d->irq);
135 variant_irq_disable(irq); 134 variant_irq_disable(d->irq);
136} 135}
137 136
138static void xtensa_irq_ack(unsigned int irq) 137static void xtensa_irq_ack(struct irq_chip *d)
139{ 138{
140 set_sr(1 << irq, INTCLEAR); 139 set_sr(1 << d->irq, INTCLEAR);
141} 140}
142 141
143static int xtensa_irq_retrigger(unsigned int irq) 142static int xtensa_irq_retrigger(struct irq_chip *d)
144{ 143{
145 set_sr (1 << irq, INTSET); 144 set_sr (1 << d->irq, INTSET);
146 return 1; 145 return 1;
147} 146}
148 147
149 148
150static struct irq_chip xtensa_irq_chip = { 149static struct irq_chip xtensa_irq_chip = {
151 .name = "xtensa", 150 .name = "xtensa",
152 .enable = xtensa_irq_enable, 151 .irq_enable = xtensa_irq_enable,
153 .disable = xtensa_irq_disable, 152 .irq_disable = xtensa_irq_disable,
154 .mask = xtensa_irq_mask, 153 .irq_mask = xtensa_irq_mask,
155 .unmask = xtensa_irq_unmask, 154 .irq_unmask = xtensa_irq_unmask,
156 .ack = xtensa_irq_ack, 155 .irq_ack = xtensa_irq_ack,
157 .retrigger = xtensa_irq_retrigger, 156 .irq_retrigger = xtensa_irq_retrigger,
158}; 157};
159 158
160void __init init_IRQ(void) 159void __init init_IRQ(void)