aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc
diff options
context:
space:
mode:
authorKyle McMartin <kyle@dreadnought.i.jkkm.org>2010-10-13 21:00:55 -0400
committerKyle McMartin <kyle@dreadnought.i.jkkm.org>2010-10-14 01:30:11 -0400
commitba20085c20f1c9e8af546dea6ad0efa421bdef32 (patch)
treea5f0574f6b1e60526eb7d1b1e1a50125f10d463c /drivers/parisc
parentcaf96194c05cd97ce96546fbcb1f35ec06aaaac7 (diff)
parisc: lay groundwork for killing __do_IRQ
Use proper accessors and handlers for generic irq cleanups. We just call back into __do_IRQ through desc->handler now, and remove the explicit calls. Signed-off-by: Kyle McMartin <kyle@redhat.com>
Diffstat (limited to 'drivers/parisc')
-rw-r--r--drivers/parisc/dino.c8
-rw-r--r--drivers/parisc/eisa.c8
-rw-r--r--drivers/parisc/gsc.c15
-rw-r--r--drivers/parisc/iosapic.c15
-rw-r--r--drivers/parisc/superio.c6
5 files changed, 19 insertions, 33 deletions
diff --git a/drivers/parisc/dino.c b/drivers/parisc/dino.c
index c542c7bb7454..3013c57f1217 100644
--- a/drivers/parisc/dino.c
+++ b/drivers/parisc/dino.c
@@ -298,8 +298,7 @@ static struct pci_port_ops dino_port_ops = {
298 298
299static void dino_disable_irq(unsigned int irq) 299static void dino_disable_irq(unsigned int irq)
300{ 300{
301 struct irq_desc *desc = irq_to_desc(irq); 301 struct dino_device *dino_dev = get_irq_chip_data(irq);
302 struct dino_device *dino_dev = desc->chip_data;
303 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); 302 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
304 303
305 DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq); 304 DBG(KERN_WARNING "%s(0x%p, %d)\n", __func__, dino_dev, irq);
@@ -311,8 +310,7 @@ static void dino_disable_irq(unsigned int irq)
311 310
312static void dino_enable_irq(unsigned int irq) 311static void dino_enable_irq(unsigned int irq)
313{ 312{
314 struct irq_desc *desc = irq_to_desc(irq); 313 struct dino_device *dino_dev = get_irq_chip_data(irq);
315 struct dino_device *dino_dev = desc->chip_data;
316 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS); 314 int local_irq = gsc_find_local_irq(irq, dino_dev->global_irq, DINO_LOCAL_IRQS);
317 u32 tmp; 315 u32 tmp;
318 316
@@ -391,7 +389,7 @@ ilr_again:
391 int irq = dino_dev->global_irq[local_irq]; 389 int irq = dino_dev->global_irq[local_irq];
392 DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n", 390 DBG(KERN_DEBUG "%s(%d, %p) mask 0x%x\n",
393 __func__, irq, intr_dev, mask); 391 __func__, irq, intr_dev, mask);
394 __do_IRQ(irq); 392 generic_handle_irq(irq);
395 mask &= ~(1 << local_irq); 393 mask &= ~(1 << local_irq);
396 } while (mask); 394 } while (mask);
397 395
diff --git a/drivers/parisc/eisa.c b/drivers/parisc/eisa.c
index 46f503fb7fc5..585417702211 100644
--- a/drivers/parisc/eisa.c
+++ b/drivers/parisc/eisa.c
@@ -233,7 +233,7 @@ static irqreturn_t eisa_irq(int wax_irq, void *intr_dev)
233 } 233 }
234 spin_unlock_irqrestore(&eisa_irq_lock, flags); 234 spin_unlock_irqrestore(&eisa_irq_lock, flags);
235 235
236 __do_IRQ(irq); 236 generic_handle_irq(irq);
237 237
238 spin_lock_irqsave(&eisa_irq_lock, flags); 238 spin_lock_irqsave(&eisa_irq_lock, flags);
239 /* unmask */ 239 /* unmask */
@@ -346,10 +346,10 @@ static int __init eisa_probe(struct parisc_device *dev)
346 } 346 }
347 347
348 /* Reserve IRQ2 */ 348 /* Reserve IRQ2 */
349 irq_to_desc(2)->action = &irq2_action; 349 setup_irq(2, &irq2_action);
350
351 for (i = 0; i < 16; i++) { 350 for (i = 0; i < 16; i++) {
352 irq_to_desc(i)->chip = &eisa_interrupt_type; 351 set_irq_chip_and_handler(i, &eisa_interrupt_type,
352 parisc_do_IRQ);
353 } 353 }
354 354
355 EISA_bus = 1; 355 EISA_bus = 1;
diff --git a/drivers/parisc/gsc.c b/drivers/parisc/gsc.c
index 20a1bce1a031..68bccdafa897 100644
--- a/drivers/parisc/gsc.c
+++ b/drivers/parisc/gsc.c
@@ -86,7 +86,7 @@ irqreturn_t gsc_asic_intr(int gsc_asic_irq, void *dev)
86 do { 86 do {
87 int local_irq = __ffs(irr); 87 int local_irq = __ffs(irr);
88 unsigned int irq = gsc_asic->global_irq[local_irq]; 88 unsigned int irq = gsc_asic->global_irq[local_irq];
89 __do_IRQ(irq); 89 generic_handle_irq(irq);
90 irr &= ~(1 << local_irq); 90 irr &= ~(1 << local_irq);
91 } while (irr); 91 } while (irr);
92 92
@@ -107,8 +107,7 @@ int gsc_find_local_irq(unsigned int irq, int *global_irqs, int limit)
107 107
108static void gsc_asic_disable_irq(unsigned int irq) 108static void gsc_asic_disable_irq(unsigned int irq)
109{ 109{
110 struct irq_desc *desc = irq_to_desc(irq); 110 struct gsc_asic *irq_dev = get_irq_chip_data(irq);
111 struct gsc_asic *irq_dev = desc->chip_data;
112 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); 111 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
113 u32 imr; 112 u32 imr;
114 113
@@ -123,8 +122,7 @@ static void gsc_asic_disable_irq(unsigned int irq)
123 122
124static void gsc_asic_enable_irq(unsigned int irq) 123static void gsc_asic_enable_irq(unsigned int irq)
125{ 124{
126 struct irq_desc *desc = irq_to_desc(irq); 125 struct gsc_asic *irq_dev = get_irq_chip_data(irq);
127 struct gsc_asic *irq_dev = desc->chip_data;
128 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32); 126 int local_irq = gsc_find_local_irq(irq, irq_dev->global_irq, 32);
129 u32 imr; 127 u32 imr;
130 128
@@ -160,14 +158,13 @@ static struct irq_chip gsc_asic_interrupt_type = {
160int gsc_assign_irq(struct irq_chip *type, void *data) 158int gsc_assign_irq(struct irq_chip *type, void *data)
161{ 159{
162 static int irq = GSC_IRQ_BASE; 160 static int irq = GSC_IRQ_BASE;
163 struct irq_desc *desc;
164 161
165 if (irq > GSC_IRQ_MAX) 162 if (irq > GSC_IRQ_MAX)
166 return NO_IRQ; 163 return NO_IRQ;
167 164
168 desc = irq_to_desc(irq); 165 set_irq_chip_and_handler(irq, type, parisc_do_IRQ);
169 desc->chip = type; 166 set_irq_chip_data(irq, data);
170 desc->chip_data = data; 167
171 return irq++; 168 return irq++;
172} 169}
173 170
diff --git a/drivers/parisc/iosapic.c b/drivers/parisc/iosapic.c
index c76836727cae..10348c9a22c9 100644
--- a/drivers/parisc/iosapic.c
+++ b/drivers/parisc/iosapic.c
@@ -615,17 +615,10 @@ iosapic_set_irt_data( struct vector_info *vi, u32 *dp0, u32 *dp1)
615} 615}
616 616
617 617
618static struct vector_info *iosapic_get_vector(unsigned int irq)
619{
620 struct irq_desc *desc = irq_to_desc(irq);
621
622 return desc->chip_data;
623}
624
625static void iosapic_disable_irq(unsigned int irq) 618static void iosapic_disable_irq(unsigned int irq)
626{ 619{
627 unsigned long flags; 620 unsigned long flags;
628 struct vector_info *vi = iosapic_get_vector(irq); 621 struct vector_info *vi = get_irq_chip_data(irq);
629 u32 d0, d1; 622 u32 d0, d1;
630 623
631 spin_lock_irqsave(&iosapic_lock, flags); 624 spin_lock_irqsave(&iosapic_lock, flags);
@@ -637,7 +630,7 @@ static void iosapic_disable_irq(unsigned int irq)
637 630
638static void iosapic_enable_irq(unsigned int irq) 631static void iosapic_enable_irq(unsigned int irq)
639{ 632{
640 struct vector_info *vi = iosapic_get_vector(irq); 633 struct vector_info *vi = get_irq_chip_data(irq);
641 u32 d0, d1; 634 u32 d0, d1;
642 635
643 /* data is initialized by fixup_irq */ 636 /* data is initialized by fixup_irq */
@@ -688,7 +681,7 @@ printk("\n");
688 */ 681 */
689static void iosapic_end_irq(unsigned int irq) 682static void iosapic_end_irq(unsigned int irq)
690{ 683{
691 struct vector_info *vi = iosapic_get_vector(irq); 684 struct vector_info *vi = get_irq_chip_data(irq);
692 DBG(KERN_DEBUG "end_irq(%d): eoi(%p, 0x%x)\n", irq, 685 DBG(KERN_DEBUG "end_irq(%d): eoi(%p, 0x%x)\n", irq,
693 vi->eoi_addr, vi->eoi_data); 686 vi->eoi_addr, vi->eoi_data);
694 iosapic_eoi(vi->eoi_addr, vi->eoi_data); 687 iosapic_eoi(vi->eoi_addr, vi->eoi_data);
@@ -705,7 +698,7 @@ static unsigned int iosapic_startup_irq(unsigned int irq)
705static int iosapic_set_affinity_irq(unsigned int irq, 698static int iosapic_set_affinity_irq(unsigned int irq,
706 const struct cpumask *dest) 699 const struct cpumask *dest)
707{ 700{
708 struct vector_info *vi = iosapic_get_vector(irq); 701 struct vector_info *vi = get_irq_chip_data(irq);
709 u32 d0, d1, dummy_d0; 702 u32 d0, d1, dummy_d0;
710 unsigned long flags; 703 unsigned long flags;
711 int dest_cpu; 704 int dest_cpu;
diff --git a/drivers/parisc/superio.c b/drivers/parisc/superio.c
index f7806d81f1e0..aceec6ed5116 100644
--- a/drivers/parisc/superio.c
+++ b/drivers/parisc/superio.c
@@ -139,7 +139,7 @@ superio_interrupt(int parent_irq, void *devp)
139 } 139 }
140 140
141 /* Call the appropriate device's interrupt */ 141 /* Call the appropriate device's interrupt */
142 __do_IRQ(local_irq); 142 generic_handle_irq(local_irq);
143 143
144 /* set EOI - forces a new interrupt if a lower priority device 144 /* set EOI - forces a new interrupt if a lower priority device
145 * still needs service. 145 * still needs service.
@@ -363,9 +363,7 @@ int superio_fixup_irq(struct pci_dev *pcidev)
363#endif 363#endif
364 364
365 for (i = 0; i < 16; i++) { 365 for (i = 0; i < 16; i++) {
366 struct irq_desc *desc = irq_to_desc(i); 366 set_irq_chip_and_handler(i, &superio_interrupt_type, parisc_do_IRQ);
367
368 desc->chip = &superio_interrupt_type;
369 } 367 }
370 368
371 /* 369 /*